We all know the symptoms that result from running on five hours of sleep (or even less) for a few nights: Our brains feel foggy, thought processes become impaired, and sometimes we feel more anxious than usual. While the most obvious effects of sleep deprivation include feelings of fatigue or lowered productivity, long-term lack of sleep can take a toll on our bodies in often invisible ways.

That’s the focus of a new study, published in Scientific Reports, which examines how sleep deprivation impacts cholesterol metabolism on a genetic level. Our bodies naturally produce cholesterol, a waxy, fatty substance that’s important for health. However, the “bad” type of cholesterol — typically what we get from food — can be harmful if we consume too much without being able to metabolize it properly. The latest study suggests that sleep deprivation is associated with impaired cholesterol metabolism, which might be one of the reasons why all those sleepless nights can take a toll on your heart health.

Past research has linked sleep deprivation to numerous chronic diseases, including obesity and weight gain, diabetes, mental health issues, and impaired memory. It’s even been associated with Alzheimer’s and heart disease, and has been shown to have a negative effect on a person’s emotional response. One 2013 study, for example, found that lack of sleep hurts vascular function and blood vessels. The latest researchers wanted to take this to the next level and study exactly how it happens, as well as how sleep loss may lead to impaired metabolism, which can increase the risk for these diseases.

“In this case, we examined what changes sleep loss caused to the functions of the body and which of these changes could be partially responsible for the elevated risk for illness,” said Vilma Aho, an author of the study, in a press release.

For their study, the researchers conducted an experiment, and analyzed data sets from two other experiments in conjunction with it. The first involved participants being sleep deprived for a week under controlled laboratory conditions, in cooperation with the Finnish Institute of Occupational Health. The second and third data sets were from DILGOM (Dietary, Lifestyle, and Genetic determinants of Obesity and Metabolic syndrome) and Cardiovascular Risk in Young Finns Study.

After analyzing these data sets, the researchers concluded that the genes involved in regulating cholesterol transport are impaired in sleep-deprived people when compared to those who get enough sleep. In addition, they found that sleep-deprived people had lower levels of HDL lipoproteins — the “good cholesterol.” Higher levels of HDL has been linked to a decreased risk of atherosclerosis, or plaque buildup inside arteries, meaning it has some protective abilities. Thus, sleep deprivation lowers HDL levels, which in turn contributes to blood vessel plaque buildup and potential heart problems.

“It is particularly interesting that these factors contributing to the onset of atherosclerosis, that is to say, inflammatory reactions and changes to cholesterol metabolism, were found both in the experimental study and in the epidemiological data,” Aho said. “The experimental study proved that just one week of insufficient sleep begins to change the body’s immune response and metabolism. Our next goal is to determine how minor the sleep deficiency can be while still causing such changes.”

Source: Aho V, Ollila H, Kronholm E, Bondia-Pons I, Soininen P, Kangas A. Prolonged sleep restriction induces changes in pathways involved in cholesterol metabolism and inflammatory responses. Scientific Reports , 2016.