The pervasive glow of electronic devices may be an impediment to a good night’s sleep. That’s particularly noticeable now, when families are adjusting to early wake-up times for school. Teenagers can find it especially hard to get started in the morning. For nocturnal animals, it spurs activity. For daytime species such as humans, melatonin signals that it’s time to sleep.

As lamps switch off in teens’ bedrooms across America, the lights from their computer screens, smartphones and tablets often stay on throughout the night. These devices emit light of all colors, but it’s the blues in particular that pose a danger to sleep. Blue light is especially good at preventing the release of melatonin, a hormone associated with nighttime.

Ordinarily, the pineal gland, a pea-size organ in the brain, begins to release melatonin a couple of hours before your regular bedtime. The hormone is no sleeping pill, but it does reduce alertness and make sleep more inviting.

However, light — particularly of the blue variety — can keep the pineal gland from releasing melatonin, thus warding off sleepiness. You don’t have to be staring directly at a television or computer screen: If enough blue light hits the eye, the gland can stop releasing melatonin. So easing into bed with a tablet or a laptop makes it harder to take a long snooze, especially for sleep-deprived teenagers who are more vulnerable to the effects of light than adults.

During adolescence, the circadian rhythm shifts, and teens feel more awake later at night. Switching on a TV show or video game just before bedtime will push off sleepiness even later even if they have to be up by 6 a.m. to get to school on time.

Blue light prevents the release of melatonin, a hormone associated with nighttime and sleep. (BIGSTOCK)

The result? Drowsy students struggling to stay awake, despite the caffeinated drinks many kids now consume.

“Teenagers have all the same risks of light exposure, but they are systematically sleep-deprived because of how society works against their natural clocks,” said sleep researcher Steven Lockley of Harvard Medical School. “Asking a teenager to get up at 7 a.m. is like asking me to get up at 4 a.m.”

In a 2014 poll, the National Sleep Foundation, an advocacy organization, polled parents, asking them to estimate their children’s sleep. More than half said their 15-to-17-year-olds routinely get seven hours or fewer hours of sleep. (The recommended amount for teens is 81 / 2 to 10 hours.) In addition, 68 percent of these teens were also said to keep an electronic device on all night — a television, computer, video game or something similar.

Based on what parents reported, sleep quality was better among children age 6 to 17 who always turned their devices off: 45 percent of them were described as having excellent sleep quality vs. 25 percent of those who sometimes left devices on.

“It is known that teenagers have trouble falling asleep early, and every teenager goes through that,” said light researcher Mariana Figueiro of the Rensselaer Polytechnic Institute in Troy, N.Y.

Figueiro investigates how light affects human health, and her recent research focused on finding out which electronics emit blue light intense enough to affect sleep. When comparing melatonin levels of adults and teenagers looking at computer screens, she was astonished by the younger group’s light sensitivity. Even when exposed to just one-tenth as much light as adults were, the teens actually suppressed more melatonin than the older people.

In another experiment, she had adults use iPads at full brightness for two hours and measured their melatonin levels with saliva samples. One hour of use didn’t significantly curtail melatonin release, but two hours’ did.

So although teenagers may be particularly susceptible, we all should be aware that artificial light can affect our circadian rhythms.

“The premise to remember is [that] all light after dusk is unnatural,” Lockley said. “All of us push our sleep later than we actually would if we didn’t have electric light.”

A study from 2013 found that people who spent a week camping in the Rocky Mountains, exposed to only natural light and no electronic devices, had their circadian clocks synchronized with the rise and fall of the sun. Although there were only eight campers, they all reacted in the same way, whether they considered themselves early birds or night owls.

So light serves as a cue, but how? It has long been known that the retina contains two types of photoreceptors, or light sensors: rods and cones. The cones allow us to see colors, while the ultra-sensitive rods are used for night vision, motion detection and peripheral vision. But surprisingly, neither of them is the body’s primary tool for detecting light and darkness and synchronizing our circadian clocks.

There’s a third kind of sensor in our eyes, officially discovered in 2002. Called intrinsically photosensitive retinal ganglion cells, or ipRGCs, these relatively crude sensors are unable to pick up on low levels of light — from a dim night light, for example — but sluggishly signal light changes.

They are the body’s way of sending ambient light information to the master circadian clock, a huddle of nerve cells in the brain. This clock makes the pineal gland start and stop the secretion of melatonin. The ipRGCs are most sensitive to blue light — that’s why blue light is bad for your sleep.

To counteract the effects of tablets’ blue light, Figueiro and Lockley recommend a free app, F.lux, that automatically warms up the colors on your various screens — more reds and yellows — at sunset and returns them to normal at sunrise.

“The amount of light you need [in order] to see is lower than the amount of light you need to affect your melatonin,” Figueiro said, which means that light-emitting screens can be used at night without disrupting sleep cycles if you put some distance between your eyes and the device. In other words, place the tablet farther away from your face than usual, or watch TV instead. Also, turning the brightness setting down on laptops, tablets and phones should help.

But for teenagers, this doesn’t completely remedy the problem of early school start times. Lockley also blames the early-morning sluggishness of many students on school start times that ignore their changing body clock.

High schools in a handful of cities have shifted their start times to 8:30 a.m. or later. In a University of Minnesota study whose final report was issued in February, researchers who surveyed about 9,000 students at eight high schools found that such a shift correlated with improvements in grades, achievement tests, attendance rates and car accident rates.

In Virginia, Fairfax County has been considering delaying its high school start time until after 8 a.m. In Maryland, Montgomery County has discussed a change but has not decided on one yet.

Last week, the American Academy of Pediatrics issued a recommendation that middle and high schools delay the start of classes to 8:30 a.m. or later. Pediatrician Judith Owens, the lead author of this policy statement, said that later start times will help adolescents get the sleep they need and lower their risks of obesity and depression.

“Sleep is important for learning, memory, brain development, health,” Lockley said. “We’re systematically sleep-

depriving kids when their brains are still developing, and you couldn’t design a worse system for learning.”

Many Americans may believe early risers are more successful and that people can learn to live on little sleep, Lockley said, but that notion is neither true nor healthy.

“There’s no training people to live without sleep,” Lockley said. “It’s like trying to train people to live without food.”

Kim is a freelance science journalist in Philadelphia.