Michael Golsorkhi, 26, was spotted with his trousers down thrusting at the oak mulch in a Premier Inn car park.
He pulled up his underpants and scuttled away into bushes when staff spotted him and shouted at him.
Golsorkhi, who had also taken cannabis and cocaine, stayed in the bushes for ten minutes before sheepishly emerging when police arrived.
Yesterday, he was jailed for eight weeks.
Magistrate Edward Tasker told him: “Think about your life. Make sure you do go out and seek help. Unfortunately for you, it is you who have found yourself in this position.’’
The incident happened last month outside the Premier Inn in Stockport, Gtr Manchester, and in sight of families eating in a Beefeater pub next door.
IN SIGHT OF FAMILIES
In a court statement, one member of the hotel staff said: “We saw a white male with his trousers down and we could see his bum.
“There was nothing between me and this male, he was about a car length away from me and he appeared to be having sex.
“At one stage, I shouted to him, “What are you doing, you dirty b*****d?” and he then leapt up, pulled his trousers up and sat in the bushes.
“We rang the police and I kept shouting: ‘What are you doing? Clear off.’”
Mobile phone footage of Golsorkhi trying to have sex with the leaves was shown in Stockport magistrates court.
MOST READ IN UK NEWS
Jobless Golsorkhi, from Hyde, Gtr Manchester, admitted outraging public decency and possessing cannabis.
He was also ordered to pay £122 in costs.
Defence lawyer Neville Warburton said: “This is no fault of anyone else except the defendant. As a result of embarrassment he has no desire to return to the Premier Inn.”
- GOT a story? RING The Sun on 0207 782 4104 or WHATSAPP on 07423720250 or EMAIL exclusive@the-sun.co.uk