I see this with people in the town that I grew up in who couldn't get out. After High School, they largely languished in the same town and haven't really done much with their lives since. I see them talking about past years and High School with far more regularity than the more successful people I know. The successful people on the other hand - they bring up the future more than they bring up the past. That's probably because they have something to look forward to on the trajectory they're on - it's a mental state, a mindset.
Now this is a very simplistic version of my observations but it's what I've seen so far. I'd love for people to bring in some kind of science to this theme that I've observed. My observations could certainly be isolated and wrong but from conversations I've had with other friends from similar smaller towns, they've reported observing similar things.
When you get older your body wears out, even if you take care of it. You may not notice it as an active 40 year old but you definitely will as a 70 year old.
Other things like culture and values change around you and you can't always keep up, causing the feeling that "the world is going to hell". Maybe your field was doing great 20-30 years ago and is now on a downward trajectory (again you can't always plan for that decades in advance).
It doesn't have to be that way but getting old at some point does suck for most people, some earlier than others.
I would say I'm attempting to get at least one decade of vaguely defined "intense" living. If I can get that it would already be more than what a lot of people get!
When you're 80 you may miss the heydays of your 40s when you were at the peak of your career (and possibly family life).
There are probably a lot of 30-somethings for which their teenage high-school years were the best years of their lives (I know several, I'm 34 myself and prefer my present to my past), so the right age for nostalgia is probably a very individual thing.