Your mom wasn’t just nagging you — not getting enough sleep really could make you sick. A study in the journal Sleep showed that in 11 pairs of identical twins, the halves who consistently got less sleep every night also had weakened immune systems.

The researchers specifically looked at white blood cells circulating in the body because of the immune system’s likely role in producing the negative health consequences of sleep deprivation, according to the study. Indeed, the findings suggest “a potential link between sleep deprivation and adverse metabolic, cardiovascular, and inflammatory outcomes.”

Read: Nap Tips for Bad Sleepers

Using identical twins was key to the study because in addition to our environment, our genetics play a role in how much we sleep. And studying twins with different sleep patterns helps to eliminate a genetic influence on the results.

“The results are consistent with studies that show when sleep deprived people are given a vaccine, there is a lower antibody response and if you expose sleep deprived people to a rhinovirus they are more likely to get the virus,” lead author Dr. Nathaniel Watson said in a statement from the University of Washington. “This study provides further evidence of sleep to overall health and well-being.”

He recommended getting at least seven hours of sleep every night so that the immune system operates best.

Read: Why You’re Sleepy When You’re Sick

What happens to the immune system is not the only thing twins have told us about how much sleep we should be getting. Another study showed that twins who slept for fewer than seven hours or more than nine were at a higher risk of depression.

Source: Gharib SA, Watson NF, Buchwald D, et al. Transcriptional Signatures of Sleep Duration Discordance in Monozygotic Twins. Sleep. 2017.

See also:

Naps Keep Us Sharp

How to Sleep Through Noise

Weird Things Your Body Does in Its Sleep