If your trip home from work often involves thinking over and over again about what a coworker said or did or how badly you were treated at your job, you are not alone. Workplace incivility is on the rise. Any sort of rude, impolite or other unpleasant behaviors from a coworker or coworkers that violate workplace norms, but fall short of issues such as sexual harassment or bullying, qualify as workplace incivility.

Conflicts on the job have a way of following you home, and a study finds workers who experience them are likely to have more trouble sleeping at night — unless they learn how to unwind and disengage from the effects of a toxic workplace.

“Incivility in the workplace takes a toll on sleep quality,” Caitlin Demsky, the lead author of the study, said in a statement. It does this “by making people repeatedly think about their negative work experiences. Those who can take mental breaks from this fare better and do not lose as much sleep as those who are less capable of letting go,” she added.

Workers usually can't stop workplace incivility themselves, so finding a way to let go of workplace stress is the best defense.

The study, a collaboration between researchers at Oakland University, Oregon Health and Science University, Portland State University and the United States Forest Service, looked at the effects of workplace incivility on nearly 700 Forest Service employees. Those workers who were exposed to incivility were more likely to have insomnia, including waking up multiple times during the night. Those who were able to detach and do something relaxing to recover after work, however, slept better.

Employees usually can't stop workplace incivility themselves, so finding a way to disconnect from workplace stress is probably the best defense. This can be difficult when work life is increasingly a 24/7 affair. Find something — anything — that you can do after work to relax and distract yourself. What works best is likely to depend on individual preferences, but the study found yoga, listening to music or simply going for a walk can all help establish the kind of post-workday boundary that can allow workers to enjoy their evenings and sleep at night.

Prevention is the best way to stop incivility before it's had time to do its damage, but this requires that management take the initiative. Managers need to be role models for civil behavior. That means speaking respectfully to employees — and not sending work-related messages after hours, which intrudes on workers' time at home and makes it harder for employees to set boundaries between work and private life.

Unfortunately, managers are often sources of workplace incivility, making it even more necessary to find ways to cope with the insults and indignities of your workplace.

In 1998, less than 50 percent of surveyed employees reported being treated rudely at work at least once a month. That number rose to 55 percent in 2014 and 62 percent in 2016. So while it might be nice to hope that your company takes action to help curb incivility, being proactive and finding a way to unwind after work might offer better odds.

The study appears in Journal of Occupational Health Psychology.