Q. Is it a Mitzvah to exercise and stay healthy?
A. Exercise is not mentioned in the Torah. However, taking care of one's health is. The Talmud understands the words "And you shall guard yourselves very well (Deuteronomy 4:15)", to be a command to watch out for one's health.
In fact, while there are other belief systems that discourage people from being proactive in taking care of their health and instead believe that prayer itself heals, Judaism encourages people to look after their health and seek counsel from medical experts in addition to asking G‑d for health. So does that mean that being very health conscious is a Jewish concept?
Maimonides, writes about staying healthy, "The body being healthy is of the ways of the Lord, for it is impossible to understand or know the knowledge of the Creator while unwell. Therefore, one should keep away from things which destroy the body, and accustom oneself to healthy and curing matters"
In Judaism good health is not an goal in itself, rather a means to an end - to serve our Creator. Only with good health can one properly fulfill G‑d's commands. Being that the purpose of staying healthy is to do more Mitzvot, good health cannot come at the expense of fulfilling other Mitzvot, It has to be one part of a complete program of observing and Mitzvot.