Being lonely isn't just associated with physical and mental health issues during waking hours. New research by a team of US scientists links our sense of loneliness to our nightmares, affecting us even while we're fast asleep.

The researchers found bad dreams can increase in frequency and intensity when people are lonely, potentially as a result of the added stress caused by the lack of strong social bonds.

"One characteristic of disturbed sleep that researchers are beginning to investigate in relation to loneliness is the frequency and intensity of nightmares, which are vivid and often horrifying dreams that frequently interrupt restorative sleep," write the researchers in their published paper.

"Although some studies have documented correlations between loneliness and the frequency and intensity of nightmares, … little is known about the mechanisms that account for variance in those associations."

First, the team reanalyzed data from a previous study looking at affection deprivation. Self-reported data from 827 adult participants in the US showed a link between greater loneliness and higher nightmare frequency, with feelings of stress acting as a mediator.

Next, fresh data was obtained from 782 adult participants in the US, who again answered questions about their feelings of loneliness and stress, and any nightmares they were experiencing. This second batch of records showed loneliness affected nightmare intensity – a measure that was missing in previous research – as well as nightmare frequency.

While this doesn't show direct cause and effect, the researchers suggest that it ties in with an evolutionary theory of loneliness put forward in previous studies: that it's a warning sign the body is missing an essential resource – social support.

"Interpersonal relationships are very much a core human need," says Colin Hessem, a communications scientist at Oregon State University. "When people's need for strong relationships goes unmet, they suffer physically, mentally and socially."

"Just like hunger or fatigue means you haven't gotten enough calories or sleep, loneliness has evolved to alert individuals when their needs for interpersonal connection are going unfulfilled."

In some ways we've evolved to become more stressed, more alert, and more likely to ruminate when we're lonely, the researchers suggest: changes that push us to find companionship, but that are also likely to wear down the body, and trigger nightmares.

Loneliness has certainly been extensively linked to poor sleep quality in the past, and it makes sense that if our minds are missing the social interactions they need in waking hours, it could persist in the mind at rest.

The team is keen for future studies to investigate whether the content of nightmares is affected by loneliness, and which treatments for loneliness might be best in terms of ensuring a better night's sleep.

"Quality restorative sleep is a linchpin for cognitive functioning, mood regulation, metabolism and many other aspects of well-being," says Hesse.

"That's why it's so critical to investigate the psychological states that disrupt sleep, loneliness being key among them."

The research has been published in the Journal of Psychology.