A new study from the University of Iowa finds that people are more likely to suffer from insomnia on days when they do not behave well at work.

The finding is based on three studies that sampled from nearly 600 workers in the United States and China, asking about their workplace behavior and sleep quality. The studies found that counterproductive workplace behavior was significantly related to what the researchers call ruminative behavior in the evening, which leads to sleep struggles.

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

Two of the studies asked employees to report their counterproductive work behaviors during the day and their off-work feelings and sleep quality at night over the course of 10 workdays. The researchers found that committing counterproductive behaviors at work was significantly related to work-related ruminative thoughts in the evening, which further led to insomnia at night.

In the other study, employees were asked to recall different types of work behaviors from the past. Those that were prompted to think back to an incidence of counterproductive work behavior had more trouble falling and staying asleep that night compared to those who recalled routine work behaviors.

The researchers say that as insomnia is becoming a public health concern, the research highlights the important role of workers’ own behaviors in creating problems for their own sleep health. They say that addressing this kind of behavior is also important for businesses because numerous earlier studies have found employees who do not get enough sleep are less engaged in their work, less productive, and are at increased risk of injury.

They recommend that managers take effective measures to reduce workers’ counterproductive behaviors.

“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 study, “Bad Behavior Keeps You Up at Night: Counterproductive Work Behaviors and Insomnia,” is published in the Journal of Applied Psychology. Its co-authors are Christopher M. Barnes of the University of Washington and Yongjuan Li of the University of Chinese Academy of Sciences.