Waking up earlier could help prevent depression.

The time that women go to sleep and wake up every day could have an effect on their risk of developing depression later on, according to a new study published in the Journal of Psychiatric Research. Using data from more than 32,470 female U.S. nurses with an average age of 55 who had not previously shown depressive symptoms, the study found that women who woke up earlier were less likely to develop depression than those who stayed up and woke up later.

During the study, which began in 2009, participants were each asked to report if they were a morning person, evening person or neither. Researchers found that after four years, 2,581 had developed depression, defined in the study by a clinical diagnosis or antidepressant use. Meanwhile, those who reported waking up early were between 12% and 27% less likely to develop depression in comparison to those who reported being neither a morning or an evening person.

“We saw that there was modest but significant association between sleep time and depression,” lead study author Céline Vetter, an assistant professor of psychology at the University of Colorado Boulder, told Moneyish. “Although the risk is fairly small, the results tell us that it is an independent contributor.”

The results were based on participants’ body clocks, or chronotypes, Vetter explained: “Chronotype is not sleep duration and not sleep timing, but more where you synchronize to the 24-hour day,” she said.

Previous studies have also linked sleep time and risk of psychological problems. An April study from Northwestern Medicine and the U.K.’s University of Surrey found that those who stay up late have a 10% greater risk of dying from physiological and neurological disorders, as well as diseases like metabolic dysfunction and cardiovascular disease.

Also read: Depression is increasing in the U.S. — especially with this group

The reason behind the connection between sleep rhythms and mental health remains unclear: “We know that chronotype is partly determined by genes and in part by the environment and biologically, so there might be some shared genetics between chronotype and mood,” Vetter said.

Although the report noted additional information is needed to make a definitive correlation between sleep schedule and depression, the study does establish a connection between waking up earlier and a decreased risk of developing depression. “More research is needed to reach firmer conclusions about how our body clocks really affect our health,” Vetter said. She also explained that the study only researched effects of sleep time on middle-aged to older women, and that the data could not be generalized to other populations such as men and younger women.

There are still plenty of benefits to waking up earlier in the day: For instance, it helps to get your body in sync with your natural sleep patterns, Chris Brantner, a certified sleep science coach at SleepZoo.com, told Moneyish. “Getting seven to eight hours of sleep a day can lower your chances of heart disease, Alzheimer’s, obesity, anxiety and more,” he added.

Here’s how you can start waking up early — or, at least, earlier than you already do:

1. First, make sure you get the right amount of sleep. “For most people, that’s about seven-and-a-half to eight hours,” Brantner said. “So figure out when you need to wake up, and count backwards eight hours to set your bedtime.” This will help you get the right amount of sleep, and give you more energy in the morning.

2. Track your sleep. Brantner suggests using an app like Sleep Cycle, which allows users to set a 30-minute window for waking, tracks sleep cycles, and attempts to wake you at the optimal point of your sleep cycle. “We wake up easiest during light sleep and hardest during deep sleep,” he said. “Waking up during REM sleep isn’t ideal either. So if you get the right amount of sleep, you’re more likely to wake up during light sleep, which will make you feel even more refreshed.”

3. Expose yourself to light as soon as possible in the morning. Brantner advises natural light in particular to help reset your body clock. “It’s also important to reduce blue lights at night as they keep you from falling asleep,” Vetter added.