An average person experienced 3.4 days of poor mental health in a month, the study said.
All types of exercise were found to have a benefit, but the biggest effect was found from popular team sports, cycling, and aerobic or gym activities.
All types of activity were found to improve mental health no matter people's age or gender, including doing the housework and looking after the children.
A study that was published in The Lancet Psychiatry journal further confirmed that physical exercise leads to better mental health. Duration and frequency of exercising was found to be an important factor, 3-5 times per week was shown to have had better mental health than those who exercised less. "We are now using this to try and personalise exercise recommendations, and match people with a specific exercise regime that helps improve their mental health".
The investigation was focused on 1.2 million adults across the United States who had participated in the Behavioral Risk Factor Surveillance System survey in 2011, 2013, and 2015.
Prof Stephen Lawrie, head of psychiatry at the University of Edinburgh, said it indicated that social and "mindful" exercise is particularly good for mental health - but not if it is overdone.
The research included data from 1.2 million people across the USA who estimated how often in the past 30 days they would rate their mental health as "not good" based on stress, depression and emotional problems. Those who exercised reported 1.5 fewer days of a struggle, which is a reduction of 43.2 percent. However, people should refrain from exercising too much, as that will instead have a negative effect on mental health.
Even completing household chores was associated with reduction in poor mental health days of around 10 per cent, or around half a day less each month, the researchers said. "I suspect we all know people who seem "addicted" to exercise and if this starts to impact on other aspects of life - like foregoing social activities because one has to be up at the crack of dawn to run several miles - it might actually be bad for people".
Exercise reduces the risk of cardiovascular disease, stroke, diabetes, and mortality from all causes, but its association with mental health remains unclear.
They were also asked how often and for how long they exercised during the past month outside of their regular job.