Jude Anderson, 32, right, had no idea how he ended up in Gorebridge – ten miles from his Niddrie home – hours after drinking heavily at a party and having an argument with his wife.
Edinburgh Sheriff Court heard how Anderson caused £3000 of damage to the self-catering property at Ivory House before falling asleep in his underpants with knives beside him.
He was discovered by horrified landlady Barbara Maton who had to force her way into the room because Anderson – also known as Cattell – had barricaded the door.
Anderson had removed every knife from a drawer in the kitchen and distributed them around the cottage before stripping and climbing into bed.
When Mrs Maton and her husband Jack woke Anderson, he said: “Where am I? I have no recollection. I was drunk last night, had an argument with my wife.”
Anderson had trashed the living room by ripping an antique chandelier from the ceiling and smashing a 50-inch flatscreen TV.
An antique lamp was lying on the floor, a ceramic toast rack was smashed and there were scuffed footprints on the walls. Officers found that Anderson had also propped a chair against a fire door to stop anyone getting in.
He failed to offer any explanation when he was interviewed by police and said he did not know how he got to the house on Vogrie Road, which is set in walled grounds and obscured by trees.
The court also heard that Anderson – who had previously admitted behaving in a threatening and abusive manner – was “fully aware” of the “disturbing” nature of the case.
Anderson, of Niddrie House Park, had blamed marital problems for his behaviour, and has since separated from his wife.
Handing Anderson a six-month jail sentence, Sheriff Thomas Welsh said: “This is breaking into someone else’s property, and wrecking the property.
“You caused £3000 of damage to someone else’s home. I have received no reasonable explanation as to why that occurred other than the fact that you were at a party and seemed to be drunk.
“You have got a record and have been in custody before.”
B&B owner Mr Maton previously told how Anderson’s break-in on July 20 was one of the most bizarre” incidents to have happened since the coachhouse launched two decades ago. The 70-year-old welcomed the sheriff’s sentence.
Mr Maton said: “If they can do something for [Anderson], then so much the better. I hope he gets some form of treatment.”
Mr and Mrs Maton had just four days to repair the substantial damage to the property, as they had a booking the following weekend.
They believe the unwelcome intruder sneaked into the house while the housekeeper was cleaning, before creeping into an empty bedroom.