Sleeping with a dim light like a television or nightlight is enough to the raise blood sugar and heart rates of healthy people, according to a new study.

Light helps our body maintain an internal clock, which coordinated biological functions like the release of hormones. But artificial light at night can throw off our circadian rhythm, interrupting the rest and repair that should happen during restful sleep. New research suggests that even when our eyes are closed, a small amount of light can disrupt the way our bodies normally keep our blood sugar within a healthy range.

In the study published in Proceedings of the National Academy of Sciences on Monday, scientists asked 20 participants ages 19 to 36 to spend two nights in their lab. On the first night of sleep, the volunteers slept in a very dark room. For their second night of sleep, half of the group snoozed with a small light that emitted 100 lux—like the glow of television at night, or streetlights through a window—and half spent their second night in a dark room.

During the trial, all participants were connected to devices that measured different markers of their sleep quality. They were each connected via an IV tube that sampled blood as they slumbered, allowing researchers to collect samples without waking the individual. Researchers also recorded participants' heart rates, brain waves and hormone levels.

"We recorded the brainwaves and could tell what sleep stage the person was in," says study author Phyllis Zee, who studies sleep at Northwestern University Feinberg School of Medicine, to Sandee LaMotte for CNN. "We recorded their breathing, their heart rate, their EKG, and we also drew blood from them to measure melatonin levels while they were sleeping."

When the volunteers awoke in the morning, the team tested their blood sugar using two different methods: one that measured the individual’s combined glucose and insulin levels after waking up, and another that involved giving people a dose of glucose and then measuring their insulin response.

Sleeping With Even a Dim Light Can Raise Blood Sugar and Heart Rate

Zee and her colleagues found that participants that slept in rooms with a dim light spent less time in the most restorative stages of deep sleep. In the morning, those same individuals had on average 25 percent higher levels of insulin, a sign that the body is struggling to convert glucose into energy, according to the Elemental’s Robert Roy Britt.

In addition to having slightly worse blood sugar control, the group exposed to dim light had a higher heart rate on average. By comparison, those that spend two nights slumbering in the dark room had little difference in their blood sugar control.

“They thought they slept well, but your brain knows that the lights are on,” says Zee.

Zee’s work is the latest in a line of research that suggests light at night can mess with our body’s function. Earlier work has linked exposure to light during sleep to an increased risk of type two diabetes in older people, and elevated risk of obesity in women, Nicola Davis reports for the Guardian.

If there is enough light to navigate your bedroom at night, it’s likely too bright. Zee recommends checking for light slipping past your blinds and curtains and considering using a sleep mask. If you can’t give up your night light, keep it dim and at floor level.

"I think the strength of the evidence is that you should clearly pay attention to the light in your bedroom," Zee tells CNN. "Make sure that you start dimming your lights at least an hour or two before you go to bed to prepare your environment for sleep."

Corryn Wetzel| | READ MORE

Corryn Wetzel is a freelance science journalist based in Brooklyn. Her work has also appeared in Audubon magazine, National Geographic and others.