Here is one of many studies to show a strong association between regular physical activity throughout life and better health and longevity when reaching old age. Human epidemiological studies like this one can largely only show correlation due to the way in which they are structured, but the equivalent life span studies in animals do show causation, in that the explanation for this correlation is that exercise acts to extend healthy life span:
We examined whether physical activity in early adulthood, late midlife, and old age as well as cumulative physical activity history are associated with changes in physical functioning and mortality in old age. Data are from 1,149 participants aged 65 years or older enrolled in the InCHIANTI study who were followed up from 1998-2000 to 2007-2008. At baseline, participants recalled their physical activity levels at ages 20-40, 40-60, and in the previous year, and they were categorized as physically inactive, moderately active, and physically active. Physical performance was assessed with the Short Physical Performance Battery and self-reported mobility disability was evaluated at the 3-, 6- and 9-year follow-up. Mortality follow-up was assessed until the end of 2010.
Physical inactivity at baseline was associated with greater decline in Short Physical Performance Battery score and greater rate of incident mobility disability (hazard ratio 4.66) and mortality (hazard ratio 2.18) compared to physically active participants at baseline. Being physically active throughout adulthood was associated with smaller decline in physical performance as well as with lower risk of incident mobility disability and premature death compared with those who had been less active during their adult life. We conclude that higher cumulative physical activity over the life course was associated with less decline in physical performance and reduced rate of incident mobility disability and mortality in older ages.