It’s a story about sleeping well and managing your weight — with a dark twist.

Experts call how well you sleep your “sleep quality.” If you tend to lie awake for a long time before drifting off, wake up in the night and have trouble falling back to sleep, or toss and turn for hours, chances are your sleep quality is low.

When your body routinely gets this kind of fitful sleep, it can increase your risk for adverse health effects — like weight gain, high blood pressure, and lipidemia (too much fat in the blood), said sleep expert Fjola D.H. Sigurdardottir, MD, PhD, a researcher at the University of Oslo Institute of Clinical Medicine in Norway.

Improving your sleep quality can lower these risks, and the first step could be as simple as turning off the light.

Dim More Than Your Screen

You may have heard that powering down your smartphone before bed can help prime your body for sleep. That’s true, but don’t stop there. 

Sleeping with a light or television on is associated with poor sleep quality and with weight gain. One study followed 43,722 women over more than five years and found those who slept with a light or TV on in the room gained more body weight than others who slept in darkness.

“There's something with light that just generally disturbs our sleep,” Sigurdardottir said at a recent sleep medicine conference in Singapore. “In particular, sleeping with the television or light in the room was associated with gaining about 5 kilos [about 11 pounds] or more.”

Other research in more than 100,000 women in the U.K. found the odds of obesity were higher with increasing levels of nighttime light exposure — an association that held true regardless of sleep duration, alcohol intake, physical activity, or smoking.

Don’t Overlook Outdoor Light

Depending on where you live, your best tools for improving sleep quality could be an eye mask or room-darkening curtains. Take it from Sigurdardottir, who’s from Iceland and works in Norway — two countries where daylight can last from 19 to almost 24 hours in the summer.

And it’s not just a problem near the Arctic Circle.

Large observational studies using satellite-derived measures of nighttime outdoor light — which capture sources like streetlights, exterior building lights, and signage — have reported links with higher body weight and greater obesity risk. In one study of almost 10,000 people in Spain, residents in the more brightly lit urban area of Barcelona were 29% more likely than others to have obesity.

A Link, Not a Cause

“It's important to remember that all of these [studies] are just associations,” Sigurdardottir said. So experts can only say there is a link between poor sleep quality and a higher risk for gaining weight or obesity. Based on how these studies are designed, they cannot say that poor sleep quality, or nighttime light exposure, causes weight gain.

While we await more studies, avoiding sleeping with a light on is a simple, low-risk step one Sigurdardottir routinely recommends to patients.