Not getting enough sleep can be detrimental to your health; many studies even link the lack of Z's to higher odds of dying during a certain time period. But a new study from Sweden suggests that if you can't sleep as much as you need during the week, you may be able to make up for it on the weekends.

The researchers found that people ages 65 and under who slept 5 hours or less a night had a 65 percent higher risk of death during the 13-year study period than those who got 6 or 7 hours of sleep a night. But individuals who balanced their short weekday sleep with longer weekend sleep did not appear to have any increased mortality risk.

The findings suggest, in other words, that you may be able to make up for the damaging effects of lost sleep.

"We can't really say 100 percent we have proven this, but it's a reasonable assumption that this is what's happening," said lead study author Torbjörn Åkerstedt, a professor of behavioral medicine at Stockholm University in Sweden.

The study was published today (May 23) in the Journal of Sleep Research.

Previous studies looking at sleep deprivation and mortality risk often asked participants about their "usual" sleep duration, which is often interpreted as one's weekday sleep schedule. But "we suspected that might not be the whole story," Åkerstedt told Live Science.

In the study, Åkerstedt and his colleagues gathered the data of more than 38,000 adults, collected in a medical survey in Sweden in 1997. In the survey, the participants answered two questions about their sleep duration, on weeknights and on days off.

The team then tracked the participants for up to 13 years, using the country's national death register, and controlled for factors that can contribute to health or mortality risk, such as gender, body mass index and smoking.

Just as previous studies have shown, sleep duration had a U-shape relationship with mortality risk. In other words, both too much and too little sleep were linked to risk of death during the study period. Like people who slept less than 5 hours a night, people who consistently slept 8 or more hours fared worse than those who slept 6 or 7 hours a night.

Short sleep duration has been linked to numerous health problems, including stroke, heart disease, metabolic syndrome, hypertension and obesity, all of which increase the risk of death. But the link between long sleep duration and mortality risk is more mysterious, and may be driven by a third factor, such as an underlying health problem that is not measurable, Åkerstedt said.

"With long sleep we don't have a good explanation. We think there has to be something going that has to do with higher need for sleep and is not healthy," he said. In other words, an underlying health problem may be the reason a person is sleeping too much.

The study also found that the link between sleep patterns and mortality disappeared for those ages 65 or older. "At that age, people get the sleep they need, whereas for a 30- or 40-year-old, there's often a huge discrepancy between the sleep they need and what they actually get," Åkerstedt said.

Although the consequences of this discrepancy can be mitigated with a weekend sleep-in, there may be a limit. Studies have found that sleep deprivation induces physiological changes, such as loss of neurons and alterations in brain connectivity, that could be potentially long term.

In addition, losing just 1 hour of sleep may have different effects on the body than losing several hours. "You are much more hit by an all-nighter than a half-nighter," Åkerstedt said.

Original article on Live Science.