NATHAN Westmoreland was drunk and fell asleep in a bingo club.
When he woke up, he found himself locked in for the night.
Cleaners let him out when they turned up for work in the morning.
But it was found that he had eaten food and damaged a sweet dispenser trying to get into it.
A burglary charge was dropped at Mold Crown Court when he admitted stealing the food and damaging the dispenser.
Judge Niclas Parry jailed him for three months. His previous convictions were the main aggravating feature.
Prosecutor Richard Edwards told how Westmoreland, 35, formerly of Chester Road East in Shotton, was found inside The Apollo Bingo Club in Rhyl.
The burglary was dropped because it was accepted he went in for a lawful purpose but then remained there and stole alcohol from the fridge and had eaten some tomatoes and cucumbers.
A sweet dispenser had been broken when he tried to get into it and his finger prints had been found on it.
Simon Rogers, defending, said: “He was drunk.
“He went in lawfully, fell asleep and then took advantage of the opportunity.”
Westmoreland appeared at court via a live television link from Altcourse Prison in Liverpool.