Even if you know that looking at a phone, tablet, or computer screen at night is bad for your sleep, it’s hard to stop.

That’s one reason there’s been a growing interest in glasses or apps that can block the blue parts of the light spectrum that experts say are especially bad for sleep.

This light doesn’t necessarily appear blue; it’s part of any bright white light, says Charles Czeisler, M.D., chief of the Division of Sleep and Circadian Disorders at Brigham and Women’s Hospital in Boston. 

More on Sleep

“Our light exposure between when the sun sets and the sun rises is probably the primary driver of sleep deficiency in our society,” says Czeisler. While that includes artificial light of all kinds, light from electronic devices that emit that blue light—such as the LED displays in smartphones, tablets, and modern computer and television screens—is particularly problematic for sleep, he says.

A number of studies indicate that using blue-blocking glasses and apps like f.lux or Apple’s Night Shift mode may improve sleep in certain cases, but they won’t cure insomnia on their own. Experts say much more research is needed on how well they work, who can benefit the most, and how to best use them.

Still, they may help, though thinking about light exposure throughout the day may be even more useful. “It just depends on how many problems a person is having with their sleep,” says Lisa Ostrin, O.D., Ph.D., an assistant professor at the University of Houston College of Optometry who has conducted research into ways that blocking blue light affects sleep. 

How Light Affects Sleep

To understand how glasses or apps affect sleep, it helps to understand light’s role in the first place.

We all have an approximately 24-hour internal clock known as a circadian rhythm that, among other things, helps determine when we feel sleepy and when we feel awake. Light and darkness regulate this rhythm, triggering the release of a hormone called melatonin that serves as a cue for sleep.

“Light is a stimulant,” says Alcibiades Rodriguez, M.D., the medical director of the Comprehensive Epilepsy Center-Sleep Center at New York University. When blue-sensitive receptors in our eyes are first exposed to light in the morning, that sends a signal to the pineal gland of our brain that shuts off the production of melatonin.

“Once you get exposed to that first light in the morning, you are supposed to fall asleep" 16 to 18 hours later, Rodriguez says. As darkness falls with night, our brains start to produce melatonin again, theoretically a couple of hours before we fall asleep.

When it’s dark outside but light indoors, it confuses this physiological system and can push back the release of melatonin, making it harder to fall and stay asleep, according to Mariana Figueiro, Ph.D., director of the Lighting Research Center at Rensselaer Polytechnic Institute. The brighter the light, the stronger its ability to suppress the release of melatonin, which is why bright lights from phones, tablets, and other LED-lit devices have a particularly detrimental effect on sleep.

“It has the potential to delay your sleep if you get that light in the evening hours,” she says. An off-kilter circadian cycle not only makes it hard to get enough sleep but also increases the risk for various cancers and other diseases

How to Regulate Blue Light to Improve Sleep

Get more sun during the day. The first thing you should do to make sure light doesn’t keep you awake at night is to get enough sunlight during the day, which can have a protective effect, Figueiro says.

“Higher [daytime] light levels help you sleep better,” she says. “It also helps you be less sensitive to that evening light.” Sunlight is far brighter than any device we use. People who spend more time outside and get more daytime light exposure have better sleep, especially if they get that light early in the day. Even having a window in an office helps, according to one study.

Reduce screen time at night. Research shows that limiting blue light exposure at night can help improve sleep, especially if a person has trouble sleeping and gets a lot of evening light or looks at a screen before bed. This is particularly important for younger people, who are more sensitive to blue light.

A study comparing participants with an average age of 23 with those with an average age of 61 found that the younger participants were far more affected by blue light. Figueiro says that adolescents are more sensitive than people in their 20s and that younger kids—around age 7 or 8—are even more sensitive.

Ideally, experts say, you’d shut down all screens at least an hour before bed, if not 2 hours. But for those who can’t—or won’t—do that, glasses or apps may help.

Try special glasses. Glasses that block blue light are a better option than apps alone, according to Ostrin, because the right ones will cut out all light in the blue spectrum, from screens and from other electric lights.

Ostrin says the most effective ones are cheap, tinted Uvex glasses (generally $10 or less) also used in labs. In 2016 Consumer Reports testing also showed that Uvex Skyper safety eyewear was the most effective at cutting out blue light.

These types of glasses give everything you see an orange tint. Those that don’t give the world an orange or yellowish hue may feel less extreme, but that means they aren’t cutting out as much blue light.

Set up apps that block blue light at night. If you can't step away from screens at night completely and don't want to buy glasses, apps that change the light emitted by a display seem to help, according to Ostrin and Figueiro. There’s still very little published research done in this area, however.

If you’re using f.lux, Apple’s Night Shift mode, or other blue-light-reducing apps, turn the nighttime setting on all the way, which will make your screen appear orange. You should also turn the brightness down because any bright light—even orange-hued—can suppress melatonin production, according to Figueiro. (Read more about how to set up night mode on your computer or phone.)

While these apps may help, says Figueiro, much of what we do with our electronic devices keeps us awake for psychological instead of physiological reasons. 

Checking the news or reading work email, for example, can be stressful and stimulating. That means that however much you are filtering out the blue light from a screen, “you are still awake, you are still doing something that is activating your brain, and you may still impact your sleep,” she says.