Federer got his second straight-set win in a row after his first two matches went all the way to the fifth set as he defeated Philipp Kohlschreiber 6-4, 6-2, 7-5.
Although he took a medical timeout for a sore back after the second set, he encountered no other problem during the game and the Swiss ace did not face a single break point against the German.
"I needed a bit of a rub on my back — or my bottom — and I didn't want to do it on court," Federer said grinning, as quoted on The Telegraph. "I wanted to get it done as quick as possible so I didn't have to wait."
"I just wanted to get it done really quickly after the set break. I said, 'Look, you know what, I need to go off court for it.' Normally you have to ask. I just ran straight to the physio. I was done in three minutes and back again.
"I just didn't want Philipp to wait. It was more precaution. It's all good. No problems there. I'm not worried about it. I'm sorry I had to do it."
Making his 12th US Open quarter-final appearance now — tied with Ivan Lendl for third-most such appearances by a player in the Open Era — Federer will play Juan Martin del Potro next.
Del Potro notably won the only Grand Slam title of his career against Federer in the 2009 US Open final and fought back from two sets down to defeat young prospect Dominic Thiem in a 1-6, 2-6, 6-1, 7-6, 6-4 thriller to reach this stage, despite nursing an illness.
The Argentine, who saved two match points against Thiem, was out of action for a while following injury in 2014 and Federer is pleased to see him back playing and delivering exciting matches.
"He was gone for so long that it's just really nice to see him back playing these kind of matches," Federer added. "That's what he came back for, to get crowd support the way he got it."
Meanwhile, earlier in the day, world number one Nadal also got his second straight-set win in Flushing Meadows this year with a 6-2, 6-4, 6-1 win over Alexandr Dolgopolov.
In what was his most dominating performance of the competition so far, the Spaniard advanced to the US Open quarter-final for the first time since 2013 when he last won the event.
"I think I played a solid match, not many mistakes," Nadal explained. "I feel that compared to other days, I feel more calm on court. Is true that I was able to have the break earlier, but really I felt more comfortable from the beginning."
"The most important thing is [the amount of] times I had the control of the time of the point. Not many balls surprised me. I didn't hit a lot of balls earlier than what I thought or later than what I thought, something that happened in the first couple of days.
"That's very good news. Because when that happens it is, of course, a step forward for me and today another one. So I'm playing a little bit better every day."
Nadal will face 19-year-old Andrey Rublev of Russia next. Rublev is now the youngest US Open quarter-finalist since Andy Roddick in 2001, following his upset win over David Goffin in the fourth round.
A win for both Nadal and Federer would see them meet in the US Open for the first time ever in the semi-final stage, with the eventual winner guaranteed to be the world number one following the event, no matter what happens in the final.