It may be time to invest in some blackout curtains, according to new research.

A study published recently in the American Journal of Epidemiology found a strong association between even low-level nighttime light exposure and depressive symptoms among elderly adults. The findings suggest that snoozing in total darkness may be ideal not only for your sleep quality, but also for your mental health, says study co-author Kenji Obayashi, a professor in the department of community health and epidemiology at Nara Medical University School of Medicine in Japan.

“Maintaining darkness in the bedroom at night may be a novel and viable option to prevent depression,” Obayashi wrote in an email to TIME.

The researchers measured nighttime light levels in the bedrooms of 863 elderly Japanese adults by placing ceiling-facing light meters at the heads of everyone’s beds for two nights, to approximate as accurately as possible the light they would see while going to sleep. The people in the study also completed sleep diaries and were monitored through surveys for the development of depression symptoms over the course of two years.

Get our Health Newsletter. Sign up to receive the latest health and science news, plus answers to wellness questions and expert tips. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Seventy-three people developed depressive symptoms during the follow-up period, and the researchers found a correlation between that progression and exposure to nighttime light. People who saw more than five lux of light at night were much more likely to develop symptoms of depression than those who slept in a completely dark room. (For context, 10 lux is like looking at a candle from about a foot away.) The study did not determine how long someone would need to be exposed to nocturnal light to see these effects, but a prior study in hamsters placed the threshold at four weeks of five-lux exposure.

Light exposure at night is likely not the only reason for the link, and the study was not designed to determine cause and effect. But while it’s not entirely clear how light is connected to depression, Obayashi says it may be related to sleep disturbances. Seeing light at night may also throw off the body’s internal clock and impair the secretion of melatonin, a hormone that promotes sleep in darkness, which could potentially have psychological consequences, he adds.

And while the study focused specifically on elderly adults, Obayashi cautions that the effects may be even more pronounced among younger people, whose eyes are more sensitive and thus register more light. “The capacity for light reception of a 70-year-old is one-fifth of that of a teenager,” he says, so it’s probably a good idea to shut out as many sources of light as possible when you sleep, no matter your age.

Write to Jamie Ducharme at jamie.ducharme@time.com.