Happy People May Be More Likely to Exercise, Study Says

They seem to stay physically active longer, too.

Elle Woods may have been on to something when she delivered one of Legally Blonde‘s most iconic quotes: “Exercise gives you endorphins. Endorphins make you happy. Happy people just don’t shoot their husbands.”

Specifically, Woods was right when she drew a connection between exercise and happiness. But exercise, and endorphins, don’t just make you happy—a new study says happiness may actually inspire you to exercise, too.

Over the course of 11 years, researchers from the Harvard T.H. Chan School of Public Health and Chapman University assessed the mental health and physical activity of almost 10,000 English adults ages 50 and older. They found that individuals who were happy and optimistic at study outset were consistently more mobile during the following decade, suggesting that as psychological well-being improves, so too does physical activity.

The study also says mental wellness may slow the rate at which older adults stop exercising, a decline that typically begins in middle age and worsens after age 75.

While there is some gray area here—does happiness influence exercise, or vice versa?—lead author Julia Boehm, formerly of Harvard and currently of Chapman, explains in a statement that the study was designed to examine the former. “What we wanted to do in this study was to assess psychological well-being before assessing physical activity to determine if happier adults are more likely to exercise than their less happy peers,” she says.

The study’s findings, Boehm says in the statement, could give doctors new tools for treating aging patients.

“It is possible that psychological well-being could be a novel way of not only enhancing psychological health but also increasing physical activity—which in turn could improve the physical health of a large segment of people in an aging society,” she says.