Coworkers Talking in Office
Credit: David Lees/Getty Images

Being nice to your co-workers seems like a no-brainer. After all, you do need to spend eight hours a day, five days a week with these people. But, beyond making your work-life easier, it turns out being a pleasant co-worker could also help you sleep better at night.

According to a 2018 study published in the Journal of Applied Psychology by the University of Iowa, the nicer you are to your co-workers the more soundly you'll sleep. But, the ruder you are, the more you'll toss and turn.

In order to come to this conclusion, the research team surveyed three separate studies that evaluated 600 workers from the United States and China.

In two of the studies the team surveyed, participants were asked to report their work behavior during the day —including if they participated in workplace gossip and aggression. They were then asked to report their emotional state and quality of sleep after work. The researchers of that study found that committing "counterproductive behaviors" was significantly related to stressful thoughts after work, which led to insomnia at night.

WATCH: This Dentist Has a Genius Tip to Help You Fall Asleep

"After people engage in bad workplace behaviors, they come to realize such bad deeds threaten their positive moral self-image, which creates stress," lead researcher Zhenyu Yuan, a doctoral student studying management and organizations in the UI Tippie College of Business, shared in a statement. "As a result, they may keep ruminating over their stress from work, and thus have trouble falling and staying asleep at night."

The third study reviewed by the researchers in Iowa asked employees to recall different types of work behaviors from their past. Those that were prompted to recall poor work behavior had more trouble both falling and staying asleep that night, despite how long ago their poor behavior was.

So what can people do to stave off work-related insomnia? It's simple. According to the researchers, all you need to do is be nice at work. Additionally, the team suggested that those in management roles should take more time to course-correct badly behaving employees before things go too far south.

"For example, in the performance review process, management should not only specify not-to-dos, but also thoroughly explain the underlying logic of the not-to-dos from a moral perspective," the team wrote.

But, if you slept like a baby last night odds are you can go to work knowing you're one of the good guys