Gordon Reid preyed on the children during a campaign of abuse that spanned almost eight years in the 1980s.
The 45-year-old appeared at the High Court in Glasgow after earlier being convicted of four charges of acting in a lewd and libidinous manner.
Judge Lady Dorrian yesterday told him: "In passing sentence I take in account that these were committed a number of years ago and you have not offended in any relevant way since."
However, she added: "These are very serious offences on three young boys at a young age."
A trial at the High Court in Falkirk had heard how the boys were aged just six when the abuse began.
Reid, of West Pilton View, Edinburgh, was also alleged to have abused another boy who was aged between five and seven at the time.
He was also said to have asked a teenage boy to perform a sex act in return for a hi-fi stereo, but he was acquitted of both allegations.
Police first became involved after one of Reid's victims confronted him about the abuse at his home two years ago.