Both of them returned this year after taking time off to recover and have turned back the clock, splitting the four Grand Slams between themselves and winning a combined 11 titles.
Nadal won his first Grand Slam since 2014 at the French Open before winning the US Open as well while Federer won his first Grand Slam since 2012 at the Australian Open before going on to win another Wimbledon title.
The poor form and injury-prone years of the likes of Murray, Novak Djokovic and Stan Wawrinka have helped the pair this year, but Petchey says the competition provided by the trio over the years was also a catalyst in them improving.
While Nadal and Federer were on their Grand Slam droughts, Djokovic, Murray and Wawrinka were all winning major titles, with the three of them winning a combined 18 career Grand Slams among themselves.
"The probably most impressive thing about both of them is that they probably, in some regards, have played their best ever tennis (in 2017)," Petchey said, as quoted by Express.
"I think some of the injuries, and the competition with Andy Murray and Novak [Djokovic] and Stan [Wawrinka] at times, have pushed them to become better players.
"You saw it from Rafa at the French, that was peak Nadal on a clay court. He could have played 120 matches at that tournament and wouldn't have lost.
"And you look at how well Roger Federer hit his backhand, especially against Rafa. It was very much a Rafa-situated backhand where he's gone through it and hit the topspin but stayed up on the baseline. Had he managed to do that a little earlier in his career, how much would that have changed their head-to-heads?"
Petchey, now a Sky Sports pundit, adds that the most impressive thing about Nadal and Federer's career resurgences is the fact that they have improved despite seemingly being in their prime a couple of years ago.
"Maybe the most impressive thing, given all their successes and everything that comes with that, that they have still found it within themselves to improve themselves as players, to get better, to achieve the success they've had this year," Petchey explained.
"I think that is an inspiration to everyone."