Here is a new problem to keep you awake at night: could sleep deprivation be affecting your social life? Not in the sense that you’re too tired to go out – although it could mean that, too – but could your very sleeplessness be off-putting to other people?

A study from the University of California, Berkeley, has strengthened the association between loneliness and sleep problems. Researchers found that sleep deprivation makes people feel lonelier. It was a small study – 18 young adults were tested, after a good night’s sleep and an interrupted one. When viewing video clips of people walking towards them and being asked to stop the tape when they felt the person was getting too close, in a sleep-deprived state they kept the person at a distance of up to 60% further back. Brain scans during the experiment also showed more activity in the area that perceives threats when the participants were sleep-deprived.

In another experiment, 1,000 people were asked to rate photographs of people – some in a sleep-deprived state – according to how socially attractive they seemed. The sleep-deprived people came off worse. And the researchers concluded that sleep-related alienation could “trigger the transmission of loneliness” – after viewing clips of sleep-deprived people, otherwise healthy and happy participants then felt lonelier.

“We humans are a social species. Yet sleep deprivation can turn us into social lepers,” said Matthew Walker, a professor of psychology and neuroscience and the senior author of the study, who wrote the bestselling book Why We Sleep. “The less sleep you get, the less you want to socially interact. In turn, other people perceive you as more socially repulsive, further increasing the grave social-isolation impact of sleep loss. That vicious cycle may be a significant contributing factor to the public health crisis that is loneliness.”

We are living in a loneliness epidemic. In the UK, more than 9 million adults report being always or often lonely and it is becoming clear that chronic loneliness and social isolation can have profound health consequences. One review of studies last year found that it is more dangerous than obesity, and that being well socially connected is associated with a 50% reduced risk of early death.

This is not the first time sleep and loneliness have been linked. In 2002, John Cacioppo, the late neuroscientist and loneliness expert, showed that lonely people experienced poorer-quality sleep. A 2011 study of 95 people by researchers at the University of Chicago found that each one-point increase on the UCLA loneliness scale was associated with an approximately 8% increase in sleep fragmentation (or disruption), even if the subject had the same amount of total sleep. “It is the soundness of sleep that appears to be compromised by feelings of loneliness,” wrote the researchers. Studies on rats have shown that socially partnered rodents exhibit increased sleep efficiency compared with those that are isolated.

Last year, a study of 2,000 young adults by researchers at King’s College London found lonelier people had poorer-quality sleep, were more likely to feel tired and had more difficulty focusing on tasks during the day than those who didn’t report feeling lonely. “It could be that feeling you’re all on your own in the world, a fundamentally unsafe feeling, could make it difficult to have a restful night’s sleep,” says Timothy Matthews, a research associate at the Institute of Psychiatry, Psychology and Neuroscience at King’s College London. “And that, in turn, could mean you’re not at your best and you don’t get the best out of your social interactions, which could increase feelings of loneliness.”

It is not clear if sleep deprivation can cause loneliness (as the Berkeley study seems to suggest), or if loneliness can cause sleep deprivation. “It’s possible it could go both ways,” says Matthews. “Loneliness could lead to sleep problems because you feel unsafe, and because you don’t sleep that could impair your interactions with other people, which could lead you to feel more cut off and lonely. We find that lonely individuals don’t necessarily sleep any less or any more than less lonely individuals, but they don’t seem to be getting the restorative benefits. [They experience] poor-quality sleep.”

There could be an evolutionary element, he says. “Some scientists believe that loneliness is part of our evolutionary heritage, because our ancestors would stick together in groups in order to succeed. If you have an aversion to being cut off from the group, that would have served an adaptive purpose. If you feel you’re alone, that’s comparable to feeling unsafe. The world seems a more threatening place and that perception could make it difficult to have a more restful sleep because you’re more on guard for your safety.”

To test the idea of how feeling unsafe could affect sleep, the researchers looked at participants’ previous exposure to violence. They found that the link between loneliness and impaired sleep quality was nearly 70% higher in those who had experienced or witnessed extreme violence. Even when Matthews controlled for mental health problems such as anxiety or depression, which can affect sleep, the link between poor-quality sleep and loneliness remained, “so it seems to be something specific to loneliness”.

Loneliness is increasingly being seen as a key part of the broader health picture. “That’s important,” says Alice Stride, a spokeswoman for the Campaign to End Loneliness. “It’s interesting that loneliness and sleep are being linked, in the sense that being connected is as important to your health as sleep, exercise and diet. Loneliness is devastating to your physical and mental health and connections with other people can be the answer to that. We know you’re more likely to have anxiety, depression, heart problems, all sorts of things.” She adds that she isn’t keen on the Berkeley researchers’ language around loneliness, such as “people being [called] ‘social lepers’. There is such a stigma around loneliness already, so we do need to be careful about the language we use.”

Could it be useful for people to keep in mind that poor sleep could be a reason for their feelings of loneliness? “Loneliness is really complex and you can’t put it down to one thing,” she says. “I think we would say it would be a factor, but we’d need to look at other factors, too.” Things such as health problems and economic status “are big factors in loneliness. If you have ill-health or you are worried about money, that is probably going to keep you up, so it can all become part of this vicious cycle.”

But for some people experiencing loneliness, the idea that poor-quality sleep can be improved, and can reduce their social isolation, may be a wake-up call.