Skimping out on sleep won’t just put you in a cranky mood. It may also reduce the effectiveness of vaccines, a new study from researchers at the University of California, San Francisco (UCSF), suggests.

The authors say their study is the first real-world look at the link between sleep duration and immune response to vaccines. Rather than analyzing participants in a sleep clinic, the researchers tracked the regular day-to-day sleep patterns of their middle-aged participants and then studied them to see how strong an immune response they mounted to a standard three-dose hepatitis B vaccine.

People getting less than six hours of sleep per night on average were far less likely than longer sleepers to show adequate antibody responses to the vaccine, the researchers found, and so they were far more likely — 11.5 times more likely — to be unprotected by the immunization.

The implications may be widespread for a society in which sleep deprivation is so commonplace: 30% of Americans get less than the recommended 7 to 9 hours of sleep per night, many of us kept awake by the glow of a TV or computer screen, or insomnia, stress or the demands of work. There’s mounting evidence that our chronic sleeplessness wreaks havoc on other aspects of our health too: studies have associated inadequate sleep with weight gain, diabetes, heart attack, stroke and even breast cancer.

The risks may be related to changes in hormone levels due to disruptions to the body’s internal clock. When people are sleep deprived — especially for those who work night shifts and sleep during the day — the body’s circadian rhythm is thrown out of whack, which in turn alters levels of the hormone melatonin. Normally, melatonin rises at night in the presence of darkness, but when people spend too little time in darkness, bathed in artificial light at night, it can suppress melatonin levels, which can in turn affect other hormones potentially influencing risks of cancer or diabetes and other problems.

Research also shows that good sleep is intimately tied to immune system regulation, say the authors of the current study, specifically in facilitating the production of protective antibodies that can dispatch bacteria and viruses. “When people are sleep-deprived, we see fluctuations in cell types important in antibody production,” says Prather. “We also see alterations in some of the hormones that influence the immune system like cortisol and growth hormones.”

To study the potential effects of such hormonal changes, the researchers recruited a sample of 123 healthy, nonsmoking Pennsylvania residents between the ages 40 and 60. All participants were asked to keep sleep diaries detailing what time they went to bed, when they woke up and whether they slept soundly or tossed and turned; some participants also wore actigraphs, which electronically monitored their movements and could verify when they were asleep.

Each participant also received a standard three-dose hepatitis B vaccine: the first and second doses were given a month apart, and the final booster dose was administered at six months. Researchers measured the volunteers’ antibody levels before the second and third dose, then again six months after the booster to determine whether they showed a “clinically protective response.”

Habitually skipping out on a full-night’s rest took a toll on the vaccine’s effectiveness. Compared with those who slept at least 7 hours a night, those who slept less than 6 were more likely to have a lower antibody response to the vaccine and were less likely to meet the threshold of protection: of the 123 participants, 18 failed to receive adequate protection from the vaccine.

The benefit of the current study’s design, says Prather, is that it allows researchers to track immune response over the longer term. In most lab-based studies, sleep deprivation results in only a short-lived decrease in antibody levels. Participants generally recover quickly, in part because the studies tend to look at younger people with more robust immune systems and also because such studies look at short-term sleep deprivation. The current study tracked sleep habits in the real world over time. Prather says his team expected to see variations in people’s immune responses based on their sleep duration, but they didn’t expect to see such persistently low levels of antibodies six months later.

It’s time that sleep be considered more widely as a crucial contributor to good health, he says. “Sleep needs to take on a larger priority when we think about our health. As scientific evidence continues to converge, it’s my hope that sleep becomes an important topic of discussion, both in the doctor’s office, in our schools and on the health policy level,” says Prather.