The two boys were born almost five years after the arrival of their twin sisters Myla Rose and Charlene Riva in July 2009 triggered a flurry of good-natured jokes about future doubles champions.
The Swiss announced earlier on Tuesday he had withdrawn from this week's Madrid Open Masters event to be at the birth.
"I've decided to withdraw from Madrid to be with my wife Mirka during these next few exciting weeks for our family," Federer wrote on his Facebook page.
"I apologise to my fans and hope to be back in Madrid next year," added the 32-year-old, currently ranked four. I'll be training near my home, and am excited to rejoin the Tour soon."
The 17-times grand slam singles champion said he would not hesitate to miss any tournament to be at the birth, even the French Open that gets underway on May 25.
However, former World No. 1 and his wife weren't made to wait that long, and he delighted fans by announcing on Twitter that Mirka had given birth to twin boys.
Mirka and I are so incredibly happy to share that Leo and Lenny were born this evening! #TwinsAgain #Miracle
Former world number one Boris Becker tweeted: "Congrats to Mirka and @rogerfederer on the new addition to the #family ! #Leo and #Lenny will partner perfectly their older sisters in mixed".
Former American tennis professional Justin Gimelstob added: "congrats to @rogerfederer #Mirka on the birth of #LEO and #Lenny the @Bryanbros @Bryanbrothers records could be in jeopardy!"
Bob Bryan, who has won 15 Grand Slam doubles titles with his twin brother Mike, responded: "Leo & Lenny! #thefuture #twinsrule."
Tennis coach Darren Cahill posted: "Fed works in multiples! Congrats to the Federer family. Very cool. 2 sets of twins."
Federer is not the first famous sportsman to have twins - Michael Jordan and Pele did as well - but two sets is a rarity.
Federer's older sister Diana also has twins and there had been some speculation earlier that his wife Mirka, a former pro tennis player herself, was expecting twins again but the couple managed to keep it a well-guarded secret.
The Swiss, who won the Madrid clay event in the Spanish capital in 2009 and 2012, has not played competitively since last month's Monte Carlo Masters, where he lost to compatriot Stanislas Wawrinka in the final.
- Sports & Recreation