In aging studies this is known as reserve capacity (how healthy we kept ourselves earlier in life) which when combined with brain plasticity (learning new ways of thinking, new subjects, new ways of doing things, etc) and functional resiliency (coping & social skills, ability to handle stress, etc) are thought to combine to expand longevity (the length of healthy years lived).
By the theory, you can't replenish reserve capacity--if you were an obese kid, yer not getting those years back--but you can defer, slow or delay further depletion. And even with a very good reserve to start, things in life can deplete that for you, a car accident, for example.
Reserve capacity can be seen as both physical (body & brain) but also as cognitive (our thinking) and I witnessed this while taking care of my mom with her Alzheimer's at the same time that some of my friends experienced the same disease with their moms.
We had very different experiences. One friend in particular, who I've known most all my life, experienced her mother losing her personality such that my friend is changing her mom's diapers while her mom is cursing her out at the top of her lungs. Just horrible. Years later, she still suffers the shock of it.
But my mom who spent her lifetime in psychotherapy, learning meditation, always reading and working puzzles, very active social life, nonstop working, swimming laps with me until just a few years before her own death, even protein shakes as far back as the early 70s, she maintained most all of her personality intact throughout that deteriorative disease and remained high functioning until the very end.
So even though she wasn't able to avoid the disease that my friend's mom got too, our experience of it was way more tolerable than what my friend and her mom went through. And I've seen this with other friends too. I'm convinced it is because of how mom lived her life.
And I think we'll see more results of this when all the kids overweight now become elderly. Even if medicare survives my generation, the next one might put a bigger strain on it with even less people. We're gonna have to start measuring populations by weight instead of by person.