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.
A man has been jailed for setting fire to six cars in East Lothian, including a camper van in which a man was sleeping.