Forty-five-year-old Jerome Boykin is charged with third-degree burglary.
Investigators said the Dothan man was trapped inside Mrs. Boomer's restaurant after he entered through the roof.
Police were called to the restaurant about 9 p.m. Monday after the owner caught someone inside.
Investigators said Boykin came down a ventilation shaft over a stove. But when he tried to leave, he was unable to get back up and both doors to the building were locked by burglar bars.
Police found Boykin hiding under a table.