Osaka -- the No. 1 women's player in the world -- retired from her quarterfinals match against Kiki Bertens. Federer -- the third-ranked men's player -- retired from his semifinals match against Stefanos Tsitsipas. Both matches were set for Friday in Rome.
"I am disappointed that I will not be able to compete today," said Federer, who has a right leg injury. "I am not 100 percent physically and after consultation with my team, it was determined that I not play."
"Rome has always been one of my favorite cities to visit and I hope to be back next year."
Osaka said she woke up Friday and couldn't move her thumb. She tried to practice and grip her racket but she couldn't.
"I'm kind of in between sad and disappointed because I really wanted to play my match today," she said.
Federer beat Joao Sousa and Borna Coric on Thursday to reach the quarterfinals. Osaka edged Dominika Cibulkova and Mihaela Buzarnescu in straight sets Thursday to advance to her match against Bertens. She is expected to keep her top world ranking.