A new study published Thursday in Diabetologia reaffirms the importance of a good night’s sleep in order to stay healthy.

Analyzing the medical histories of more than 100,000 female nurses, the study authors found those who reported frequently having trouble sleeping were 45 percent more likely to develop type 2 diabetes over the course of a decade than those who didn’t. For the unfortunate nurses who reported having sleep apnea, sleeping fewer than six hours, and often working the graveyard shift in addition to sleeping difficulty, that risk increased more than four-fold. Though poor sleepers were also more likely to have underlying health problems like hypertension or high BMI, these factors only partially explained the association between sleep troubles and diabetes.

“Our findings highlight the importance of sleep disturbance in the development and prevention of type 2 diabetes,” the authors concluded.

The authors utilized data from two of the longest-running observational studies in existence: The Nurses’ Health Study I and II, which began in 1976 and 1989 respectively. Every two years, NHS volunteers are mailed questionnaires about their “lifestyle practices and other exposures of interest, as well as the incidence of disease.” For the purposes of their study, the current authors solely focused on the 133,353 women who weren’t already diagnosed with preexisting conditions like cancer, heart disease and diabetes by the year 2000, answered questions about their sleeping habits, and remained in the NHS for up to an additional ten years.

During that decade, 6,407 women in total self-reported a diagnosis of type 2 diabetes, while 5.8 percent of NHS I women and 4.8 percent of NHS II women reported having difficulty falling or staying asleep all or most of the time. The 45 percent increased risk of diabetes observed in women who had trouble sleeping compensated for variables like socioeconomic status, physical activity, and a family history of diabetes. And even after accounting for hypertension, BMI, and depression, there still remained a 22 percent evaluated risk attributable to having sleeping difficulty alone.

“The unexplained risk might be caused by other pathways, which warrant future studies,” they wrote.

While earlier research has found a similar link between sleep and diabetes, the authors wrote theirs is the first “to examine and quantify the mediation effects of chronic conditions on the association between sleeping difficulty and type 2 diabetes,” as well as the first to “examine the joint effects and test the interactions between sleeping difficulty and other sleep related conditions on the risk of type 2 diabetes.”

Women who reported any one sleep-related condition had a 47 percent increased risk of diabetes compared to sound sleepers; those who reported two had a 214 percent increased risk; three conditions correlated to a 284 percent increased risk; and having all four was associated with a whopping 417 percent increase in risk.

Although there remains the mystery of how exactly poor sleep contributes to the development of type 2 diabetes, the authors hope their study further highlights the need for medical professionals to pay attention to their patients’ sleeping habits.

“The findings provide evidence to clinical physicians and public health researchers for future diabetes prevention among a high risk population with multiple sleep disorders,” they concluded.

Source: Li Y, Gao X, Winkelman J, et al. Association between sleeping difficulty and type 2 diabetes in women. Diabetologia. 2016.