Federer, whose older sister Diana also has twins, is expected to return to tennis at the French Open, which starts on 25 May.
The 2009 champion at Roland Garros has not missed a Grand Slam tournament since 2000.
Federer, who won the last of his Grand Slam titles at Wimbledon in 2012, last played three weeks ago when he lost to countryman Stanislas Wawrinka in the final of the Monte-Carlo Masters.
In Madrid on Tuesday, third seed Wawrinka, the Australian Open champion, lost 1-6 6-2 6-4 to Austrian qualifier Dominic Thiem, while fifth seed David Ferrer beat fellow Spaniard Albert Ramos 7-6 (8-6) 5-7 6-3.
Spain's Nicolas Almagro needed 11 match points to beat Andrey Golubev 6-3 6-7 (9-11) 7-6 (7-4) and set up a second-round match against Britain's Andy Murray on Wednesday.
In the women's tournament, eighth seed Maria Sharapova came back from 4-1 down in the final set to beat American Christina McHale 6-1 4-6 6-4 in round two, while China's second seed Li Na beat compatriot Chinese Zheng Jie 6-2 6-3.
ncG1vNJzZmivp6x7o67CZ5qopV%2BovbC%2B02irnqaensBwfpZrcGptY2k%3D