Sacrifice sleep for several nights in a row to meet a deadline or study for exams, and you risk disrupting hundreds of genes that promote health, fight disease and combat stress. According to a new study, more than 700 genes rely upon a solid night’s sleep in order to function properly. The Guardian reports that the study results raise questions about what sleep might have to do with a host of diseases, including diabetes, obesity, heart disease and depression.

To arrive at these findings, researchers at Surrey University asked 26 healthy men and women to stay at their laboratory for twelve nights. The visits were broken into two parts. During the first session, the participants were allowed to sleep for up to ten hours. In the second, the researchers cut their sleep off at a measly six hours each night. At the very end of each of those two weeks, the participants were kept awake for a full day and night.

The researchers used EEGs to measure brain activity in their participants. When the subjects were allowed to lie in bed for ten hours, they actually slept for an average of 8.5 hours, while on the six hour nights, participants only got 5 hours and 42 minutes of sleep. In the latter scenario, 444 genes were repressed, and 267 genes were more active than they normally would be under more favorable sleeping conditions.

Some of those genes affect metabolism, others the immune system or stress regulation. People who slept normally had more than 1,800 functioning genes over a 24 hour period, whereas nearly 400 of those were knocked out of service completely when participants were not allowed to sleep.

More from Smithsonian.com:

How to Sleep Like Salvador Dali

Experiments Show We Really Can Learn While We Sleep