(CBS) — Lack of sleep may be ruining your social life, new research has found. A study published in the journal Nature Communications found that sleep-deprived people feel lonelier and less inclined to engage with others. These individuals tend to avoid close contact in much the same way as people with social anxiety, researchers from the University of California, Berkeley, concluded.

“We humans are a social species. Yet sleep deprivation can turn us into social lepers,” study senior author Matthew Walker, a UC Berkeley professor of psychology and neuroscience, said in a statement.

Sleep-deprived individuals were also found to be more socially unattractive to others, the study found. And even just a brief encounter with a person who has not gotten enough sleep could make a well-rested person feel lonely, triggering a sort of viral contagion of social isolation.

Michael Breus, a clinical psychologist and specialist in sleep medicine, said the results of the study make sense.

“Think about it like this. When you haven’t had a good night’s rest, it’s not like you want to run around and give everybody a hug. You’re kind of in your own space, being a bit isolated because you’re just not feeling so great,” Breus told “CBS This Morning.”

The study found that others pick up on that vibe, which in turn can make you more isolated, he explained.

The researchers conducted a series of experiments using brain imaging, standardized loneliness measures, videotaped simulations, and surveys.

In one of the most telling experiments, the study authors tested the social and neural responses of 18 healthy young adults following a normal night’s sleep and a sleepless night. The subjects watched video clips of individuals with neutral expressions walking toward them. Participants were told to judge when the person got too close and to push a button that would stop the video. This recorded how close they allowed the person to get.

The results showed that those who were sleep-deprived kept the approaching person at a significantly greater distance away — between 18 and 60 percent further back — than when they had been well rested.

Brain scans also monitored the participants as they viewed the videos of individuals walking toward them. In the brains of those who were sleep deprived, the authors observed heightened activity in an area of the brain that perceives potential incoming human threats.

How much sleep do we really need?

Feeling lonely and isolated is just one effect of sleep deprivation. Research has showed that too little sleep is associated with an increased risk of chronic medical conditions like diabetes, high blood pressure, and heart disease.

The amount of sleep a person needs varies by age. The Centers for Disease Control and Prevention says:

  • children aged 3 to 5 need 10 to 13 hours of sleep
  • children aged 6 to 12  need 9 to 12 hours of sleep
  • teens aged 13 to 18 need 8 to 10 hours of sleep
  • adults 18 and older need 7 or more hours of sleep

However, sleep needs are also based on the individual.

In order to learn how much sleep you need each night, Breus has an experiment he tries with his patients.

“We know the average sleep cycle is 90 minutes long and the average person has five of them [which makes] 7 and a half hours,” he said. “If you have a normal wake up time of 6:30, your bedtime becomes 11. Try it for a week. If you can wake up before your alarm, you’ve found your sleep need. If you can’t wake up before your alarm, maybe you should go to bed a little bit earlier.”