Falling asleep while the television is on can be soothing, sort of like a nightlight for grownups. But a new study suggests that sleeping with the light on — whether it’s a lamp, a television set or a nightlight — could have some serious effects on your health.

A recent Northwestern University study observed sleep conditions in 20 adults. One group slept in a dimly-lit room for one night, then spent the next night sleeping in a room with an overhead light. The second group slept two consecutive nights in a room with dim lighting.

The study found an increase of insulin resistance in group one — the group with the overhead light. Group one participants also experienced higher heart rates.

Insulin resistance is when they body stops responding to insulin, the hormone that helps glucose enter cells. Insulin resistance can cause weight gain, polycystic ovary syndrome, vascular disease and more.

The Journal of American Medical Association published a study in 2019 linking light exposure while sleeping to an increase in weight gain.

To get the most out of your sleep, consider investing in thicker curtains, shades or blinds. A nighttime eye mask could also be beneficial.