In a world of cities that never sleep, constant digital stimulation, and laptop screens that never stop glowing, people are sleeping far less than they used to. Polls have shown that the number of people who get eight hours of sleep is slowly shrinking, as busy schedules and long work days take priority over rest.

The total impact of that is still unknown, but we do know that sleep deprivation can have a negative impact on our overall health and cognitive function. And not getting enough sleep — or at times, getting too much — may increase men’s risk of diabetes, according to a new study.

“In a group of nearly 800 healthy people, we observed sex-specific relationships between sleep duration and glucose metabolism,” said Femke Rutters, lead author of the study, in a press release. “In men, sleeping too much or too little was related to less responsiveness of the cells in the body to insulin, reducing glucose uptake and thus increasing the risk of developing diabetes in the future. In women, no such association was observed.”

In the study, the researchers observed 788 participants who were part of the European Relationship between Insulin Sensitivity and Cardiovascular Disease study, measuring their sleep duration and diabetes risk factors. The participants were all between the ages of 30 and 60, and from 14 different European countries. Using a single-axis accelerometer, which tracks movement, the researchers measured the participants’ sleep hours and their levels of physical activity. They compared that to the risk of diabetes, which they measured using a hyperinsulinemic-euglycemic clamp. The device identifies how well the body metabolizes glucose, as well as a person’s sensitivity to insulin.

It was the men on the extreme ends of the total sleep scale — those who slept the least or the most — who had an increased risk of impaired glucose processing ability and higher blood sugar levels. Men who slept an average of seven hours a night, meanwhile, seemed to be protected from these effects. It didn’t appear to affect women, however, but that might have been a cause of the study population. The researchers would need to recreate the findings in another, larger study to confirm their conclusion.

Sleep is actually somewhat of a delicate balance, something that goes through various cycles to cleanse our brain of waste. Disruptions during the REM cycle, for example, has been linked to impaired memory formation. If we’re not sleeping enough, we’re at risk of craving junk food, approaching issues in a more emotional way, and developing problems like heart disease, memory loss, and impaired concentration. Past research had found a link between lack of sleep and an increased risk of type 2 diabetes. If we sleep too much, we may have a higher risk of lower back pain, diabetes, and heart disease, as well as fatigued and lethargy.

Regardless, the study suggests an important notion: Even healthy people are at risk of the negative effects of a sleep imbalance. It’s generally agreed upon that healthy adults should receive anywhere between 7.5 to 9 hours of sleep every night. “Even when you are healthy, sleeping too much or too little can have detrimental effects on your health,” said Rutter. “This research shows how important sleep is to a key aspect of health — glucose metabolism.”

Source: Rutters F, et al. Journal of Clinical Endocrinology & Metabolism, 2016.