A lot can change as we get older, from our sleeping habits to our daily routines. And according to a new study published in JAMA Psychiatry, there are some lifestyle tweaks we can make in older age that are associated with not only better cognition, but mental health, too. Here’s what the study found.

Studying the relationship between sleep, memory, and happiness.

For this study, researched wanted to look at lifestyle factors and activities in older adults, and whether those things were linked with health factors.

To do so, they had 1,800 adults with an average age of 73 wear wrist monitors for a week to get a sense of their activity levels. The participants also filled out questionnaires that assessed mental health and cognition.

Based on the findings, it appears adults who have an “early rising/robust pattern,” AKA waking up before 7 a.m. and staying active during the day, did better on their cognition assessments and had better mental health than the participants whose daily schedules were less “robust.”

The participants who were going to bed and waking up later, and had less activity during the day, were found to have the highest rates of cognitive impairment and were also the most likely to have significant depressive symptoms.

The researchers do note that these findings are correlative, and not necessarily a sign of causation. As the study’s lead author, Stephen Smagula notes, the relationship between sleep, activity levels, and mental health could go both ways. (As in, poorer mental health and/or cognition can influence your sleep and activity, and vice versa.)

But however you look at it, it is clear that staying active in is associated with better physical and mental health outcomes, so this is just one more reason to get moving. And as the study authors explain, “activity” doesn’t necessarily mean physical activity: It can be meeting up with a friend for coffee, doing a mentally stimulating puzzle, or going to a place of worship.

As we get older, the importance of staying engaged in daily activities and getting consistent, quality sleep doesn’t change. And based on these findings, getting up early seems to be part of a recipe for success for good health in our later years.