He will be placed on the Sex Offenders Register for three years.
Stewart was caught in the act with his bicycle by cleaners in his bedroom at the Aberley House Hostel in Ayr in southwestern Scotland.
Gail Davidson, prosecuting, told the Ayr Sheriff Court: "They knocked on the door several times and there was no reply.
"They used a master key to unlock the door and they then observed the accused wearing only a white t-shirt, naked from the waist down.
"The accused was holding the bike and moving his hips back and forth as if to simulate sex."
Both cleaners, who were "extremely shocked", told the hostel manager who called police.
Sheriff Colin Miller told Stewart: "In almost four decades in the law I thought I had come across every perversion known to mankind, but this is a new one on me. I have never heard of a 'cycle-sexualist'."
Stewart had denied the offence, claiming it was caused by a misunderstanding after he had too much to drink.
But he subsequently changed his stance and admitted to the charges against him.
He wont go to jail, of course, Probation is the suspension of a jail sentence. Those sentenced to probation are allowed to return to the community on the presumption that they would behave.
During the period of probation, they will have to abide by the conditions set forth by the Court and would be under the supervision of a probation officer.
The Sex Offenders Register is generally meant to protect the community against paedophiles. With his name being entered in it, Stewart will be under tight police watch. Any infraction again, Stewart had it. Severe punishment would be his lot.