A healthy dose of purpose may be the solution to getting a good night’s sleep, according to a new study published in the journal Sleep Science and Practice.

Researchers from Northwestern University in Chicago found that a strong sense of purpose, or having a “good reason to get up in the morning,” as Ian Sample from the Guardian puts it, predicted better sleep quality in older adults.

They studied a sample of 825 older adults (the study didn’t clarify how old they were, exactly) evenly split among African American and white people and had participants take two self-reported tests. One test measured sleep quality and screened for disorders like sleep apnea—which affects breathing during sleep and can be dangerous if left untreated—and Restless Leg Syndrome, a sleep-disrupting condition the Mayo Clinic defines as an “uncontrollable urge to move your legs,” usually resulting from leg discomfort.  

The second test gaged purpose by having participants rate how much they agreed with statements like “I feel good when I think of what I’ve done in the past and what I hope to do in the future” and “some people wander aimlessly through life, but I am not one of them.”

People who felt their “lives had the most meaning,” according to the Guardian, were less likely to have sleep apnea, and had “slightly better sleep quality overall.” It might be that purpose acts as a buffer against sleep issues: “We found that higher levels of purpose in life were generally protective against the occurrence of sleep apnea and RLS [Restless Leg Syndrome] as well as the onset of sleep apnea and RLS over the following 1 to 2 years,” the study authors wrote.

The study authors suggest that having a strong sense of purpose might be linked to better overall mental and physical health. Plus, people with purpose may be more likely to pursue healthy activities that contribute to well-being like exercising or socializing, the study authors note.

While these findings have limitations (self-reported data can be skewed, in this case people might have wanted to appear more purposeful than they really are), they are an important step in understanding the science linking psychological well-being and physical health, specifically sleep.

This is especially important for older adults: Our sleep gets worse with age, and a lack of deep sleep (which disorders like sleep apnea and Restless Leg Syndrome can disrupt) has causal links to diseases we’re more vulnerable to with age, like cancer and dementia.

These findings are more proof that the way we live our lives has a huge impact on the quality of our sleep. And while “find purpose” might not feel like a realistic item for the top of your to-do list, you can implement small changes to seek meaning, whether that be walking to work and observing your surroundings, or volunteering within your community.

Read more here.