More exercise was not always better, and the study found that exercising for 45 minutes three to five times a week was associated with the biggest benefits.
The study included all types of physical activity, ranging from childcare, housework, lawn-mowing and fishing to cycling, going to the gym, running and skiing.
Exercise reduces the risk of cardiovascular disease, stroke, diabetes, and mortality from all causes, but its association with mental health remains unclear.
Previous research into the effect of exercise on mental health has conflicting results. While some evidence suggests that exercise may improve mental health, the relationship could go both ways – for example inactivity could be a symptom of and contributor to poor mental health, and being active could be a sign of or contribute to resilience. The authors note that their study cannot confirm cause and effect.
“Depression is the leading cause of disability worldwide, and there is an urgent need to find ways to improve mental health through population health campaigns,” says Dr Adam Chekroud, Assistant Professor of Psychiatry at Yale University, and Chief Scientist at Spring Health, USA. “Exercise is associated with a lower mental health burden across people no matter their age, race, gender, household income and education level. Excitingly, the specifics of the regime, like the type, duration, and frequency, played an important role in this association. We are now using this to try and personalize exercise recommendations, and match people with a specific exercise regime that helps improve their mental health.” 
In the study, the authors used data from 1.2 million adults across all 50 US states who completed the Behavioral Risk Factor Surveillance System survey in 2011, 2013, and 2015. This included demographic data, as well as information about their physical health, mental health, and health behaviors. The study did not take mental health disorders into account, other than depression.
Participants were asked to estimate how many days in the past 30 days they would rate their mental health as ‘not good’ based on stress, depression and emotional problems. They were also asked how often they took part in exercise in the past 30 days outside of their regular job, as well as how many times a week or month they did this exercise and for how long.
All results were adjusted for age, race, gender, marital status, income, education level, employment status, BMI, self-reported physical health and previous diagnosis of depression.
On average, participants experienced 3.4 days of poor mental health each month.
Compared to people who reported doing no exercise, people who exercised reported 1.5 fewer days of poor mental health each month – a reduction of 43.2% (2.0 days for people who exercised vs 3.4 days for people who did not exercise).
The reduction in number of poor mental health days was larger for people who had previously been diagnosed with depression, where exercise was associated with 3.75 fewer days of poor mental health compared with people who did not exercise – equivalent to a 34.5% reduction (7.1 days for people who exercised vs 10.9 days for people who did not exercise).
Overall, there were 75 types of exercise recorded and these were grouped into eight categories – aerobic and gym exercise, cycling, household, team sports, recreational activity , running and jogging, walking, and winter or water sports.
All types of exercise were associated with improved mental health, but the strongest associations for all participants were seen for team sports, cycling, aerobic and gym exercise (reduction in poor mental health days of 22.3%, 21.6%, and 20.1%, respectively).
Even completing household chores was associated with an improvement (reduction in poor mental health days of around 10%, or around half a day less each month).
The association between exercise and improved mental health (a 43.2% reduction in poor mental health) was larger than many modifiable social or demographic factors. For example, people with a college education had a 17.8% reduction in poor mental health days compared with people with no education, people with normal BMI had a 4% reduction compared with people who were obese, and people earning more than US$50,000 had a 17% reduction compared with people earning less than US$15,000.
How often and for how long people completed exercise was also an important factor. People who exercised between three and five times a week had better mental health than people who exercised less or more each week (associated with around 2.3 fewer days of poor mental health compared with people who exercised twice a month).
Exercising for 30-60 minutes was associated with the biggest reduction in poor mental health days (associated with around 2.1 fewer days of poor mental health compared with people who did not exercise). Small reductions were still seen for people who exercised more than 90 minutes a day, but exercising for more than three hours a day was associated with worse mental health than not exercising at all. The authors note that people doing extreme amounts of exercise might have obsessive characteristics which could place them at greater risk of poor mental health.
“Previously, people have believed that the more exercise you do, the better your mental health, but our study suggests that this is not the case. Doing exercise more than 23 times a month, or exercising for longer than 90 minute sessions is associated with worse mental health,” continues Dr Chekroud. 
“Our finding that team sports are associated with the lowest mental health burden may indicate that social activities promote resilience and reduce depression by reducing social withdrawal and isolation, giving social sports an edge over other kinds.” 
The study used people’s self-reported assessment of their mental health and exercise levels so could be subject to bias. It also only asked participants about their main form of exercise so could underestimate the amount of exercise they do if they do more than one type.
Writing in a linked Comment, Dr Gary Cooney, Gartnavel Royal Hospital, UK, says: “There is gathering interest and momentum around research into exercise as a treatment for mental health disorders. The appeal is multifaceted: patients, particularly those reluctant to pursue medication or psychological approaches, are drawn to the self efficacy of exercise, the ability to attain a degree of agency in their own process of recovery. Mental health professionals, for their part, recognize the urgent need to address the comparatively poor physical health outcomes in the psychiatric patient population. With very high rates of physical co-morbidity, and marked reductions in life expectancy, an intervention that might improve both mental and physical health is of particular clinical interest.”
If you are pumped up on the value of exercise, check out my Page – Important facts about your brain (and exercise benefits).