David Longstaff rubbed the inside legs of the young girls, one of whom was under 13, as they slept on the couch of his Duns home while they were on a sleepover on June 19.
The court heard that Longstaff touched one of the girls who was pretending to be asleep and then made out she was waking up so that he would stop.
Longstaff then moved his attentions towards her friend rubbing his hands up and down her upper leg.
The girls then told Longstaff's partner at the time and said it had happened on other occasions when they were staying over.
The partner attended at Duns Police Station to report the assaults.
Longstaff's lawyer said that the first offender had described himself in background reports as a "monster" for committing the offences.
Sheriff Peter Paterson said it had been difficult reading the Victim Impact Statements and the effects that the sexual assaults had on the two young girls who had "lost interest in most aspects of life" as a direct consequence of his actions.
He added: "I accept you have pled guilty at the earliest opportunity and you have taken responsibility for your actions but the court has no alternative but to impose a custodial sentence.”
Longstaff was jailed for 16 months and was made subject to the notification requuirements of the Sexual Offences Act for the next 10 years.