Federer beat Australia’s Sam Groth 6-4 6-4 6-4 to reach the third round and will play Spain’s Marcel Granollers next.
Fifth seed, Sharapova also progressed, reaching the fourth round with a 6-2 6-4 win over Sabine Lisicki and will meet Caroline Wozniacki in a tasty fourth-round clash.
Two-time champion, Venus Williams and second seed Simona Halep were, however, knocked out of the US Open in their third round matches.
Venus lost 6-0 0-6 7-6 (7-5) to Italy’s Sara Errani.
Having twice come back from being down a break in the third set, Williams had a chance to serve out the match, but Errani, who had not won more than three games in a set against Williams in three previous meetings, showed great fighting spirit to force a tie-break.
Williams was, however, undone by too many unforced errors as she had 52 in all.
Thus, the Italian would play Mirjana Lucic-Baroni next, after the Croatian qualifier beat Romania’s Halep 7-6 (8-6) 6-2.
Sixth seed, Angelique Kerber, was also a major casualty as she was beaten 6-1 7-5 by Switzerland’s Belinda Bencic .
Meanwhile, Andy Murray must return to his least favourite court in grand slam tennis for his third-round match against Andrey Kuznetsov at the US Open on Saturday.
Murray, who is seeded eighth, will again take to the second show court during the afternoon heat, having suffered cramp in the same circumstances in his opening game at the Louis Armstrong Stadium.
While Arthur Ashe Stadium, where he impressively dispatched Matthias Bachinger in round two, ranks second only to Centre Court in the Scot’s affection, Louis Armstrong has been a place of unremitting struggle.
It was on Armstrong, on Monday, where Murray was hit by a severe bout of cramp during his match against Robin Haase that could easily have led to defeat.
A 2010 defeat by Stan Wawrinka not withstanding, the good news for Murray is that he usually wins in the end, but drama can normally be guaranteed on Flushing Meadows’ second stage.