If you find yourself toggling over to look at Facebook several dozen times a day, it’s not necessarily because the experience of being on social media is so wonderful. It may be a sign that you’re not getting enough sleep.

In a recently completed study, researchers at the University of California, Irvine (UCI) demonstrated that lack of sleep—in addition to affecting busy college students’ moods and productivity—leads to more frequent online activities such as browsing Facebook.

“When you get less sleep, you’re more prone to distraction,” says lead researcher Gloria Mark, a UCI informatics professor, in a release. “If you’re being distracted, what do you do? You go to Facebook. It’s lightweight, it’s easy, and you’re tired.”

Sleep deprivation can lead to loss of productivity throughout the economy. It can cause workplace mishaps and make drivers fall asleep at the wheel. Experts in the field of human-computer interaction want to know how sleep loss impacts people so they can design better technologies and products.

“There have been lots of studies on how information technology affects sleep. We did the opposite: We looked at how sleep duration influences IT usage,” says Mark, who will present the findings at a computer-human interaction conference in May.

She and her colleagues collected data from 76 UCI undergraduates—34 males and 42 females—for seven days during the spring 2014 quarter. The study controlled for students’ gender, age, course load, and deadlines and relied on sensors to objectively gauge their behavior, activities, and stress levels.

Students’ computers and smartphones were equipped with logging software, and time stamps recorded when subjects switched from one application window to another and when they spoke on the phone or texted. They were asked to fill out a sleep survey each morning and an end-of-day survey at night.

Participants also filled out a general questionnaire and sat for an exit interview. Periodically throughout the week, they received probing questions from researchers regarding their mood, the perceived difficulty of whatever task was at hand, and their level of engagement in their work.

Central to the study was a concept known as “sleep debt,” the accumulated difference between the amount of sleep needed and the amount experienced.

Mark says the study’s findings show a direct connection among chronic lack of sleep, worsening mood, and greater reliance on Facebook browsing. She also found that the less sleep people have, the more frequently their attention shifts among different computer screens, suggesting heightened distractibility.