Euan Walker also let a yacht float out into the North Sea.
He pleaded guilty to wilful fire-raising, wilful fire-raising to danger of life, and reckless behaviour between 16 and 20 March in Musselburgh.
The 29-year-old was jailed for 20 months when he appeared for sentence at Edinburgh Sheriff Court.
The court heard the most serious incident happened in a car park in  Musselburgh's Mall Avenue.
Damien Witowski returned to his Fiat Camper van at about 20:00 on 20 March and went to sleep.
At about 00:05, another motorist driving past saw the van on fire and phoned the fire service. The blaze was extinguished and it was found that Mr Witowski "had actually slept throughout the incident".
Defence advocate, Lily Prais, told Sheriff Fiona Tait her client had turned to alcohol and drugs after separating from his girlfriend.
He had struggled to come to terms with his behaviour, she said, which was entirely out of character.
He had shown genuine remorse and had been completely unaware there had been anyone in the camper van.
Walker, she said, had never been in trouble before and was now living with his family in Edinburgh, who were very supportive.
Sheriff Tait told Walker that given the nature of the charges and, in particular the charge involving the camper van in which Mr Witowski had "fortunately escaped", a custodial sentence was inevitable.

Raiders broke into the house in Old Glamis Road between 18:55 and 19:35 on Tuesday.
A full list of the items of jewellery stolen and details of the foreign currency have not yet been released by police.
Officers have asked anyone who was in the area at the time to come forward.

Media playback is not supported on this device
The 28-year-old Briton was fastest in the first of Saturday's two runs to climb from fourth to third and she held her position in the final run.
Gold went to World Cup leader Jacqueline Lolling, with fellow German Tina Hermann finishing second.
Yarnold's overall time of two minutes 36.08 seconds was 0.73secs behind Lolling.
She returned to competition in December after taking a year out and will attempt to retain her Olympic title in South Korea next year.
"This is where I want and need to be - and is a major stepping stone," Yarnold told BBC Sport.
"It shows I've made the right decisions over the past couple of years and means more than I could ever explain.
"I've had a few head and back issues recently and I physically wouldn't be here without the help of my physio and my family.
"I am still dealing with some stuff but I am lucky with the team I have and that helps make me a stronger person and a better athlete."
Yarnold's Great Britain team-mate Laura Deas finished 10th, with Donna Creighton 22nd.
Nick Hope, BBC Olympic sports reporter:
Despite all of Lizzy Yarnold's previous gold medals, World Championships bronze is a huge result both for her at the British skeleton team.
She seemed to ease to Olympic, World Championship, European and World Cup titles between 2013 and 2015 - but, in truth, those successes left her exhausted.
Although a year sabbatical has seen her return refreshed, younger rivals have emerged and the reappearance of dizzy spells - which first emerged in late 2014 - as well as the appearance of a new serious back problem, has made her comeback challenging than expected.
However, despite just one World Cup podium finish this season Yarnold states she's now a "better slider" than before her break - and she has proved that when the big occasion arises she can still deliver.
That is a crucial confidence boost for the British team, because with Laura Deas yet to rediscover the form that led to World Cup podiums last season and the GB men some way off he pace, Yarnold remains their only realistic hope of an Olympic skeleton medal in 2018.
A man has been jailed for setting fire to six cars in East Lothian, including a camper van in which a man was sleeping.
[NEXT_CONCEPT]
Police are appealing for information after a safe containing foreign currency and jewellery was stolen from a house in Dundee.
[NEXT_CONCEPT]
Olympic champion Lizzy Yarnold won bronze at the Skeleton World Championships in Germany.