Everybody knows to get a good night's sleep if they want to feel their best, but the emotional consequences of not having adequate rest could be far greater than we ever realised, according to new neurological research.

In a new study analysing the brain scans of healthy volunteers, scientists say they've established a "causal connection" between the quality of sleep people get and resulting anxiety levels the next day – a link that could have "societal relevance", given the anxiety epidemic gripping America and elsewhere.

"We have identified a new function of deep sleep, one that decreases anxiety overnight by reorganising connections in the brain," says neuroscientist Matthew Walker from the University of California, Berkeley.

"Deep sleep seems to be a natural anxiolytic (anxiety inhibitor), so long as we get it each and every night."

Of course, none of this should come as an outright shock. For years, scientists have been warning about what happens in the brain when we don't get enough sleep, and numerous extreme experiments have charted the grave physiological consequences of sleep deprivation.

Despite this, millions upon millions of us don't sleep as much as we know we're supposed to, and Walker's new research illustrates another big problem stemming from that.

The researchers scanned the brains of 18 healthy young adults in two experimental sessions, during which they watched video clips depicting 'aversive' scenarios, designed to elicit an emotional response.

One of these sessions occurred in the morning, after the participants enjoyed a full night of sleep. The other session took place on another morning, after they'd stayed up all night in the laboratory, doing things like reading, watching movies, and playing board games (while being monitored to ensure they didn't rest).

After the sessions, the participants had their anxiety levels measured by a psychological test called the State-Trait Anxiety Inventory, and the results showed the sleepless night effectively triggered a 30 percent increase in anxiety levels.

"Notably, 78 percent of all participants in the sleep-deprived condition reported an increase in anxiety, confirming a robust impact of sleep loss on the escalation of anxiety in healthy individuals," the authors explain in their paper.

What's more, half of the sleep-deprived participants actually exceeded anxiety levels that serve as a base threshold for symptoms of clinical anxiety disorders – and all it took to get there was one sleepless night.

"Without sleep, it's almost as if the brain is too heavy on the emotional accelerator pedal, without enough brake," Walker says.

The fMRI scans from the sessions showed increased emotional reactivity following sleep loss in the amygdala (which helps control our fight or flight reflex) and the dorsal anterior cingulate, which flares during negative emotional responses.

While activity in those brain regions was heightened in the sleepless volunteers, activity in the medial prefrontal cortex – which helps regulate emotions like anxiety – was basically shut down.

Conversely, polysomnographic readings taken while the sleeping participants slept indicated that the least anxiety was experienced by those who enjoyed the longest periods of deep sleep, called non-REM (NREM) slow-wave sleep (SWS).

"Our experimental studies demonstrate that, within this interaction, sleep loss can causally and directionally instigate high levels of anxiety in individuals who were otherwise non-clinically anxious when sleep-rested," the researchers explain.

"This finding defines a causal influence of disrupted sleep on the development of anxiety, beyond simply a co-occurring symptom of anxiety disorders."

The team shared their initial research last year, but their now published, peer-reviewed paper describes additional experiments that back up their primary findings.

These include an additional cohort of 32 participants that repeated the polysomnographic experiment (replicating the first results), and online research involving over 300 participants, who answered questions about their night-to-night sleep and day-to-day anxiety levels – offering insights on how even small disruptions in sleep over time can affect and predict anxiety.

Taken together, the team says the data suggest both a "neural framework explaining how and why insufficient sleep may contribute to anxiety" and also a palliative function of NREM sleep "capable of ameliorating anxiety".

"Consistent with the anxiogenic impact of sleep deprivation, we establish that even subtle perturbations in sleep quality from one night to the next negatively impact anxiety," they write.

"Shifting to prevention, our findings suggest that even modest improvements in sleep quality may have the potential to reduce subjective anxiety, serving as a non-pharmacological prophylactic."

In other words, sleep is good for you. More to the point, as Walker says, "the decimation of sleep throughout most industrialised nations and the marked escalation in anxiety disorders in these same countries is perhaps not coincidental, but causally related".

It's a statement (and a study) that all just sounds like so much common sense – while at the same time seeming entirely profound.

Either way, deep sleep sounds like the anti-anxiety drug many of us have been searching for, and we should definitely try it out sometime.

The findings are reported in Nature Human Behaviour.