Andrew Lothian preyed on the 14-year-old boy while he supervised him during what was to be a fun sleep-over at the man's home.
Lothian, who had drunk a half bottle of vodka before attacking the teenager, was told his evidence during a trial last month was largely "made up as he went along" , after his DNA was found on the boy's underwear.
The teenager, who was staying at Lothian's home with another teenage boy in Port Seton, East Lothian, woke up at about 1am to find the 53-year-old attacking him as he slept on a mattress next to his friend's bed.
The terrified youngster immediately packed up his belongings and fled the house in tears in the middle of the night.
Following a three-day trial at Haddington Sheriff Court in June, Lothian was found guilty of assaulting the boy at his home on 9 December 2012.
Lothian was placed on the Sex Offenders Register, ordered to carry out 275 hours of unpaid work in the community and told he would be placed under supervision for three years when he appeared for sentencing.
The court had previously heard from Police Scotland forensic scientist Mandy Bath, who said she found Lothian's DNA on the outside and inside of the boy's underwear.
Ms Bath, who said there was a one-in-a-billion chance that DNA profile was not Lothian's, said: "On the information provided to us we would not expect to find a DNA profile matching Andrew Lothian's on the underpants if there had been no sexual contact between them."