History of Exercising for Health & Fitness

When did people pick up on the notion that you could increase your health and all purpose fitness and begin engaging in it for this reason?

Note: this is distinguished from the idea that an athlete practicing for a specific type of event or sport could benefit from practicing. I’m talking about ordinary people looking to improve their health and fitness, such as we see now.

Of course, people were a lot more active in general in prior generations, so it wasn’t as big of an issue as it is today. Nonetheless, there were people who led sedentary lives even then (e.g. nobles, clergy, scholars etc.), and I’m wondering how much awareness there was that some amount of exercise was necessary or at least beneficial, in different eras.

Im sure such fitness regimes have gone on forever, albeit practiced by perhaps more eccentric characters. I remember reading a biography of Montaigne a while ago. Montaigne’s father(of 16th century minor nobility) was what we would today call a “fitness freak”. I cant remember his father fitness regime but his fitness outlook and dedication did not sound too disimilar to modern keep-fit obsessives.

Back to the ancient Greeks, at least. It wasn’t just a matter of being fit enough to be able to fight, I think - the Romans didn’t think of mens sana in corpore sano all by themselves.

I think the association of that phrase with exercise is fairly recent.

The Kamasutra of Vatsyayana describes the daily life of a nagarika or wealthy householder in India around the start of the Common Era, in some detail:

So for people who were wealthy enough not to have to work, recreation might well include some physical activity such as horseback riding, swimming and playing sports (as well as quite a bit of sex, natch), but there seems to be no social consensus that you should be deliberately striving for physical activity in order to keep yourself healthy.
Where voluntary vigorous physical effort for self-improvement purposes does appear in the ancient Indian context is, of course, in the yoga tradition. But AFAIK the earliest texts describing and prescribing the practice of strenuous asanas or postures are from about the middle of the first millennium CE. And of course, the type of health and fitness that their authors are mostly concerned with is spiritual rather than solely physical: asanas and their strengthening effects are supposed to help you focus your mind and advance in enlightenment.