Most people have experienced an inability to sleep, and sometimes the reason has to do with your mattress. A mattress that’s too firm or too soft can affect your ability to sleep. Other times, it could be a high-stress lifestyle. If your job takes a heavy toll on you, it can be difficult to disconnect at night and fall asleep.

No matter the cause, serious sleep deprivation has some major negative implications. Everyone is familiar with the dull, dragging feeling of sleep deprivation. It feels like you’re walking around in mud, a tad slower both physically and mentally than your usual pace. Its never a fun place to be and the effects can compound over time.

Recent research from a study published in the journal Science has shown that imaging explains what happens when your circadian rhythms are interrupted. The study featured 33 healthy participants (split fairly equally between men and women) who werent allowed to sleep for two days. Afterwards, they slept for 12 hours in recovery mode.

During the entire experience, scientists observed the brain activity of participants. While they were awake, they performed psychomotor vigilance tasks to determine their reaction times. The findings showed that when patients hadn’t slept properly, there were significant fluctuations in melatonin, and it was difficult for them to perform simple functions. Their ability to handle the tasks assigned was directly correlated with their amount of sleep.

Overall, researchers discovered that low quality sleep can wreak havoc on the cognitive performance of individuals.

“We found that cognitive performance does not only depend on sleep debt but is also nonlinearly regulated by the oscillating circadian clock,” senior author Pierre Maquet, MD, of the University of Liege, in Belgium, told Medscape Medical News. “It seems that we do not have one but multiple clocks in the brain. Because there is more than one clock in the brain, lack of sleep can do different things to the body, but all of the results were negative.”

One of the most important takeaways from this finding was that sleep debt is not the only thing to be monitored for those who dont sleep well. Its also important to watch circadian rhythms, since these directly correlated with the ability to handle simple tasks. “A major emphasis has been put on sleep debt during the last years, and the community forgot about the circadian rhythm,” Dr. Marquet said. “This paper reminds us of the powerful influence of the circadian clocks on cognitive performance and the underlying brain activity.”

Furthermore, Marquet explained that sleep deprivation could be a result of sleeping in the wrong circadian phases. This can be altered by a poor sleep environment, heavy stress at work, and other factors that make it difficult to hit REM during sleep.

“Our data may ultimately help us to better understand how the brain maintains performance during the day, why many symptoms in psychiatric and neurodegenerative conditions wax and wane, and why in the early morning after a night without sleep we struggle to maintain attention, whereas in the evening it is not an issue.”

Another significant finding of the study was that some parts of the brain performed better with lack of sleep than others. For example, participants seemed to handle cognitive tasks more proficiently the second day of no sleep than they did on the first, which indicates that the thalamus does not react as negatively to a lack of sleep as other parts of the body.

Though this information doesn’t seem to offer help for those suffering from insomnia, its a pretty amazing breakthrough for those who study serious mental illnesses, like Alzheimers and dementia. Understanding the negative effect that sleep has on different parts of the brain can help researchers discover preventative measures and treatments to combat serious mental illnesses.

We already know that sleep can hinder the brains ability to function, but these findings give us some answers, which provide greater hope for solutions.