Adolescents and preteens need an average of nine hours of sleep every night. If you are the parent of a child who is between 12 and 17, you may be laughing ruefully at this number and wondering if your son or daughter has ever gotten that much sleep on a weeknight.

Inadequate sleep causes physical and mental health problems like obesity and depression; it interferes with school achievement and social functioning. Even more importantly, sleep habits established during adolescence tend to persist into adulthood, so kids who stay up late as teens tend to become adults who also find it difficult to sleep when they should.

Teens who used electronic devices five or more hours a day were 50 percent more likely to experience short sleep duration when compared to those who spent one hour a day on such devices.

It's well documented that American teens are not getting enough rest. A recent study looked at long-term trends in sleep and what might be contributing to its decrease.

The investigators examined changes in the average sleep duration since 1991 using data collected by two large-scale studies that included over 300,000 teens. As this time period encompasses the rise of computers, video games, online offerings and cell phone use, it offers a picture of the effect these sorts of distractions have had on teens' sleep. The studies also provided information on the amount of time preteens and adolescents spent on screens, television watching, homework and work for pay.

The team compared the changes in sleep time over the years to shifts in the amount of time teens spent in screen-based, sleep-interfering activities, focusing on the period from 2009 to 2015, the years during which smartphone and tablet use reached a 50 percent market saturation among teens.

In 1991, only 26 percent of adolescents reported getting less than seven hours of sleep a night. Between 2009 and 2015, this rose to 42 to 43 percent of teens. The most abrupt increase in the percentage of teens' sleeping too little was seen in the period between 2011 and 2013, when it rose to 40 percent.

Teens' brains are still developing, and they are in the midst of their education. Loss of sleep can have lasting consequences in both these areas.

Media screen activities had increased the most over the study period and were most closely associated with decreased sleep time. Teens who used electronic devices five or more hours a day were 50 percent more likely to experience short sleep duration when compared to those who spent one hour a day on such devices. The average teen spends almost 2.5 hours per day on electronic devices, according to the authors.

One of the most obvious ways electronic devices influence the amount of sleep teens get is that teens are spending time online or texting when they would be sleeping, but there are plenty of other ways our online lives disrupt sleep. Even if kids aren't using electronics at night, they may be turning to them instead of going out and getting exercise, which can also interfere with sleep.

The interactions they have on their devices — through social media, for example — may also be disturbing, arousing or otherwise harm the quality of their sleep. Light from the devices may disturb their circadian rhythms, specifically the sleep/wake cycle, making it harder and harder for them to fall asleep. And finally, the use of social media on electronic devices has been associated with increased depression, which interferes with sleep.

“Given the importance of sleep for both physical and mental health, both teens and adults should consider whether their smartphone use is interfering with their sleep,” said the study's lead author, Jean M. Twenge, a professor of psychology at San Diego State University, in a statement. “It's particularly important not to use screen devices right before bed, as they might interfere with falling asleep.”

Teens' brains are still developing, and they are in the midst of their education. The loss of sleep electronic devices can set in motion can have lasting consequences in both these areas. It also raises the likelihood of diabetes, obesity and depression; and may permanently disrupt their sleep as adults.

The authors call for family and public health measures to address this correctable health risk. Parents should discuss how important getting enough sleep is with their children. The good news is that it will make them feel better almost immediately.

The study is published in Sleep Medicine.