Nick Obradovich couldn’t sleep. It was October 2015, and a surprise heat wave sent thermometers across San Diego soaring 7 degrees Fahrenheit above average. The window air-conditioning unit in his living room wasn’t powerful enough to cool the bedroom. So the climate impact researcher lay on top of his sheets, fixated on the idea that global warming could forecast many more nights like that one.

Turns out that may be the case. Surges in nighttime temperatures correspond with an increase in self-reported nights of restless and insufficient sleep, according to a study Obradovich published Friday in the journal Science Advances.

“Human sleep relies on ambient temperature for its regulation,” Obradovich, now a postdoctoral fellow at Harvard University’s John F. Kennedy School of Government, told HuffPost by phone this week. “When that ambient temperature is unusually warm, when it’s not expected to be, that can predict disruption in sleep patterns.”

To test his theory, he and three other researchers compared U.S. responses from 765,000 people surveyed by the Centers for Disease Control and Prevention between 2002 and 2011 to local weather data. On hotter-than-normal nights, more people said they struggled to fall or stay asleep.

That bodes ill for the future: Temperatures are forecast to rise more than 3.5 degrees Fahrenheit above pre-industrial levels by the end of the century as burning fossil fuels, industrial farms and deforestation emit more planet-warming gases into the atmosphere. An increase that large would yield catastrophic results as ice caps melt and glaciers retreat. Antarctic ice melt alone could send sea levels surging by up to 49 feet by 2500, a study released in March 2016 found.

Lack of sleep is linked to heart disease, obesity and mental health diseases. In the more immediate term, sleep deprivation impairs motor and cognitive functions and leads to rash behavior, so it makes sense that poor sleep patterns