People who sleep 5 or fewer hours a night are likely to also drink significantly more sugary caffeinated drinks, such as sodas and energy drinks, according to a study of more than 18,000 adults led by University of California (UC) San Francisco scientists.

The authors emphasize that it’s not yet clear whether drinking sugar-sweetened beverages causes people to sleep less, or whether sleep deprivation makes people seek out more sugar and caffeine to stay awake, though previous research suggests both could be true.

“We think there may be a positive feedback loop where sugary drinks and sleep loss reinforce one another, making it harder for people to eliminate their unhealthy sugar habit,” says lead author Aric A. Prather, PhD, assistant professor of psychiatry at UCSF, in a release. “This data suggests that improving people’s sleep could potentially help them break out of the cycle and cut down on their sugar intake, which we know to be linked to metabolic disease.”

The study was published online Nov 9 will be included in the December 2016 issue of Sleep Health.

A growing body of research has linked sugary beverage consumption to metabolic syndrome, a cluster of conditions including high blood sugar and excess body fat, which can lead to obesity and type 2 diabetes. Lack of sleep is also associated with a higher risk for metabolic disease. Recently, several studies have linked the two factors in school-age children, showing that children who get less sleep are more likely to drink soda and other sugary beverages during the day, said Prather, who is also associate director of the UCSF Center for Health and Community.

To understand whether this is a more general pattern in the adult population, Prather and his team analyzed the 2005-2012 records of 18,779 participants in the National Health and Nutrition Survey (NHANES), an ongoing study of dietary habits and health status in a nationally representative sample of US adults administered by the National Center for Health Statistics. The study includes participants’ reports of how much sleep they usually got during the work week, as well as their total consumption of various beverages, including caffeinated and non-caffeinated sugar-sweetened beverages, fruit juice, drinks with artificial sweeteners, and plain coffee, tea, and water.

After controlling for a host of sociodemographic factors and health variables that could potentially impact sugary beverage consumption and sleep, the researchers found that people who regularly slept five or fewer hours per night also drank 21% more caffeinated sugar-sweetened beverages—including both sodas and non-carbonated energy drinks—than those who slept 7 to 8 hours a night. People who slept 6 hours per night regularly consumed 11% more caffeinated sugar-sweetened beverages. On the other hand, the team found no association between sleep duration and consumption of juice, tea, or diet drinks.

Prather noted that previous research has strongly indicated that sleep deprivation increases hunger, particularly hunger for sugary and fatty foods.

“Short sleepers may seek out caffeinated sugar-sweetened beverages to increase alertness and stave off daytime sleepiness,” he says. “However, it’s not clear whether drinking such beverages affects sleep patterns, or if people who don’t sleep much are more driven to consume them. Unfortunately, the data in the current study do not allow us to draw any conclusions about cause and effect.”

Additionally, says Prather, sleep duration figures in the study were based on self-reporting, which might not accurately reflect the participants’ true sleep patterns. “It will be important to have additional studies with more objective measures of sleep such as EEG recordings or wearable sleep monitors,” he says. “We also need long-term prospective studies to better understand how sleep and sugary beverage consumption affect one another over time.”

Whatever the relationship between sugar and sleep, says Prather, the study may point to a new way to address the problem of excess sugar consumption.

“Sleeping too little and drinking too many sugary drinks have both been linked to negative metabolic health outcomes, including obesity,” says Prather. “Given the likely two-way relationship between sugary drinks and short sleep, enhancing the duration and quality of sleep could be a useful new intervention for improving the health and well-being of people who drink a lot of sugary beverages.”