Sleep loss is linked to everything from car accidents to weight gain.

But a new study from researchers at the University of California, Berkeley has added another possible consequence of not getting enough sleep: loneliness.

The study, published earlier this month in the journal Nature Communications, found that sleep-deprived people felt more lonely and less social around other people. Researchers also found that well-rested people observing the sleep-deprived individuals rated them as more lonely and less socially desirable. And, after the observers saw a brief clip of a lonely person, they themselves felt lonelier.

The study involved 18 healthy young adults, and more than 1,000 observers recruited through Amazon’s Mechanical Turk marketplace for the online portion of the study.

“I think this is an interesting study,” said Dr. Chris Winter, neurologist at Charlottesville Neurology and Sleep Medicine and author of “The Sleep Solution: Why Your Sleep Is Broken and How to Fix It.”

“There are many studies that illustrate how sleep deprivation affects our mood, energy, ability to pick up on social cues, risk-taking behavior, enthusiasm, concentration, etc. The number of patients in the study —18 — is a little underwhelming.”

How sleep loss might impact social interactions

Despite the small sample size, Winter said he’s not surprised by the results.

“My guess is that sleep deprivation impairs this drive on many levels,” he said. “Motivation to interact, the ability to focus and concentrate on what they are saying, the ability to effectively interpret social cues, monitoring appropriate content, deriving pleasure from the interaction… all of these things are going to be impaired. Let’s not forget the fact that when one is sleep-deprived, one has a strong desire to sleep.”

In other words, the overwhelming desire to sleep, for someone who needs sleep, takes precedence over heading to the bar after work with friends.

“I believe that this kind of sleep deprivation, often seen in shift workers, is a huge reason for the relationship issues they struggle with,” said Winter. “These individuals are often forced to choose between sleep and social interaction… both choices lead to loneliness.”

Dr. Jay Puangco, a neurologist specializing in sleep medicine at the Pickup Family Neurosciences Institute at Hoag in California, said sleep deprivation can affect mood, attention, and cognition.

A sleep-deprived person does not feel well,” he said. “They may not have the energy required for social interaction. This may require having alertness to cognitively process what other people are saying, reading their body language, and giving appropriate feedback.”

He did find it interesting that even people who slept well avoided people who were sleep-deprived, and that the loneliness became contagious.

“People who are sleep-deprived simply are not happy people,” he said. “Nobody wants to be around a moody person.”

Even though sleep is important and has observable consequences like these, Puangco said the value of sleep is underestimated in our society.

“In fact, society often sees sleeping as a sign of weakness,” he said. “Why sleep when you could be doing something? Working leads to increased productivity, which means if you want to get ahead, the first thing to sacrifice is sleep.”

But he said the exact opposite is true.

“Sleep improves attention, cognition, and health, and can make a person more efficient and productive with decreased errors,” he said. “We always preach about diet and exercise. Diet and exercise require a strong foundation of sleep to be effective.”

Tips for better sleep health

Puangco offered some suggestions for improved sleep, including getting up around the same time each day — even on weekends. Exercise regularly during the day, but avoid exercise in the late evening.

Also avoid mind-stimulating activities like paying bills in the few hours before bed. Avoid any alcohol within three hours of sleep because it can contribute to awakening during the night, he added.

“Before bed, keep a to-do journal,” he said. “Write down all the things to worry about. Then write down what you can do tomorrow. Mark the other things that [you] can do later on [in] the week. This will help clear [your] mind of worry.”

Originally published on Healthline.

Follow us here and subscribe here for all the latest news on how you can keep Thriving.

Stay up to date or catch-up on all our podcasts with Arianna Huffington here.