We’re a nation of unhealthy sleepers. Ten percent of us are insomniacs, many more wake up constantly throughout the night and a growing number are simply too enthralled with our smartphones to put them down and go to bed.

But what’s the worst kind of sleep for your health: the kind where you keep a normal bedtime but are constantly up every few hours, or the kind where you go to bed late and only get a few hours of shut-eye? Scientists might finally have an answer.

Reporting in the journal Sleep, lead author Patrick Finan, assistant professor of psychiatry and behavioral sciences at the Johns Hopkins University School of Medicine, and his colleagues conducted one of the first studies comparing the two types of sleep—interrupted sleep and abbreviated sleep—in a group of 62 healthy men and women who were good sleepers. The participants spent three days and nights in a sleep lab and answered questions about their mood every evening before dozing off. While they slept, the researchers measured their sleep stages so they could document when and how much of each stage of sleep, from light to deeper slumber, each volunteer got every night. A third were randomly assigned to be woken up several times a night, another third were not allowed to go to sleep until later but weren’t woken up, and the final group, which acted as the control, was allowed to sleep uninterrupted through the night.

When Finan compared the three groups’ mood ratings, he found that the interrupted and short sleepers both showed drops in positive mood after the first night. But on the next nights, the interrupted sleepers continued to report declining positive feelings while the short sleepers did not—they stayed at about the same level they had reported after the first night. This drop in positive mood occurred regardless of what the participants reported on the negative mood scale. So having disrupted sleep, says Finan, may have a stronger effect on dampening positive mood than it does on increasing negative emotions.

When he looked at the brain patterns of the two disrupted sleep groups, he found that those who woke up repeatedly showed less slow wave sleep, or the deep sleep that is normally linked to feeling restored and rested, than those getting the same amount of sleep but in a continuous session. “We saw a drop in slow wave sleep so large and sudden, and it was associated with a striking drop in positive mood that was significantly different than in the other group,” he says.

This article originally appeared on Time.com.