New research confirms what many of us have long suspected: The more time you spend staring at your smartphone screen, the less quality sleep you’re likely to get.

Although 78% of Americans report feeling more eager to go to bed when their sheets have a fresh scent, they may not be getting the amount of sleep they need if they spend their settling-down time checking social media, sending texts, or playing games on their phones. Researchers at the University of California, San Francisco, have discovered that while phone time and sleep time are inversely related, the correlation is strongest in the hour just before bed.

“Because sleep quality is so important, I think it’s useful for individuals to take these data and at least give avoidance of their smartphones an hour or so before they go to bed a try to see if it helps,” said lead author Dr. Gregory Marcus.

Using data from approximately 650 adults, the researchers found that users spend an average of 38 hours per month — or nearly four minutes per hour — on their phones. Younger adults, African-Americans, and Hispanic users tended to score higher than average in screentime. Across the board, those who spent more time on their phones usually slept less, which could in turn lead to further health concerns.

“There’s growing evidence that poor sleep quality is not simply associated with difficulty concentrating and being in a bad mood the next day, but may be a really important risk factor to multiple diseases,” Marcus said. Those diseases include heart disease, diabetes, and hypertension.

Previous research has also linked the “blue light” of phone screens to a decreased production of melatonin, the hormone that regulates sleep cycles. However, Marcus and his colleagues stressed that the study only implied correlation, not causation.

“We can’t exclude the possibility that people who just can’t get to sleep for some unrelated reason happen to fill that time by using their smartphone,” Marcus said. Nevertheless, it may be a good idea to keep the phone away before bedtime anyway.