Federer sat out of the last six months of 2016 with a knee injury, with the Swiss legend missing the Olympics in Brazil and the US Open.
However, in his first event back this year, he won the Australian Open by beating Rafael Nadal in the final in January.
He took a break during the clay-court season, before returning to win his eighth Wimbledon title.
Croft says his form this year has been “unthinkable”.
ROGER FEDERER VS RICHARD GASQUET: FOLLOW LIVE UPDATES
“I think he surprised even himself to be honest,” the former British No 1 said.
“I don’t think he expected to come out and in the very first event which was the Australian Open, the first Grand Slam of the year as well, that he would come out and to play the sort of tennis that he managed to play that week in January.
“I think he thought his body would take longer to make adjustments to playing competitive tennis again after six months off.
“I mean it’s unthinkable that he could come out and play the way he has.
“One thing he talked a lot about was playing with so much freedom.
“That’s something he keeps reminding himself throughout the course of 2017, that he wants to get back to that.”
Roger Federer is currently facing Richard Gasquet in the quarter-final of the Shanghai Masters.