Yes, it is true. There are many things in medicine that we know are true, even if we cannot fully explain them. The effect of exercise on mood is one of those things. It is well known that people who do regular aerobic exercise for at least 20 minutes, four times a week have improved mood, improved sleep, and higher functioning at work and at home.
Aerobic exercise includes running, swimming, bicycling, dancing, etc.
Some researchers think that aerobic exercise releases endorphins in the brain. Endorphins are natural chemicals that seem to act like antidepressants. Scientists don't yet know precisely which chemicals endorphins are. So even though we do not know exactly how or why this works, we know that it does. We also know that people who exercise regularly often feel down or blue if they stop exercising for a few weeks because of illness or time constraints.