In the nineties - in fact, the era directly pre-Federer - most players would be thinking pretty hard about retirement at 31! The current situation where all of the top three men's players (and six of the top seven) are over thirty is pretty much unheard of (with some notable exceptions of course, like Connors getting to the US Open semifinal at 39).
(The ages of the women in the top twenty currently is much more how it used to be in the men's game.)
I think (hope!) it's probably a combination of factors - firstly that the top three really are exceptional, probably the best men's tennis has ever seen; vast improvements in modern sports science - nutrition, strength training and conditioning, etc; being much more selective with their schedules (especially Federer of late); improvements in equipment; and some weird quirk that has meant the younger generation hasn't really come through and the older ones have been able to stay at the top with a periodic cycle of displacing each other as they get injured, struggle with form, and so on.
Or maybe it's just drugs, though they get tested regularly and punished very severely (but you could say the same about cycling...).
(The ages of the women in the top twenty currently is much more how it used to be in the men's game.)