We've all had them: a bad day because of a rude customer or colleague. How do you shake the feeling so it doesn't carry over to tomorrow? The key, experts say, is to end the day doing something fun and relaxing before going to bed so you can enjoy a better night's sleep.

Some people love to clean their desk before they leave the office because they don't want to return to a cluttered desk and it helps them clear their mind. I've learned that by protecting my morning hours, which is my peak productivity time, I've helped lessen the stress I place on myself in the afternoon, making it harder for me to absorb and carry over into the evening that negativity. Some people make lists. Turns out, maybe it's what we do after hours that is most important.

"Sleep quality is crucial because sleep plays a major role in how employees perform and behave at work," says Caitlin Demsky, PhD, of Oakland University and lead author of the research that appears in the Journal of Occupational Health Psychology, published by the American Psychological Association.

"In our fast-paced, competitive professional world, it is more important than ever that workers are in the best condition to succeed, and getting a good night's sleep is key to that," adds Demsky.

Detach from negative experiences before going to bed.

According to the research findings, those experiencing rude or negative behavior at work, such as being judged or verbally abused, had more symptoms of insomnia, including waking up multiple times during the night. On the flip side, those who were able to detach from the negative experience by doing something relaxing after work, such as practicing yoga, listening to music or going for a walk, slept better.  

"Incivility in the workplace takes a toll on sleep quality," adds Demsky. "It does so in part 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."

Good night's sleep is good for our health.

Practicing this behavior takes work because many of us get so wound up after experiencing negative behavior. Making the practice consistent reaps more than just work benefits. It's good for our health. Not getting a good night's rest can lead to higher risk of cardiovascular diseases, increased blood pressure and fatigue, according to the authors of the research.

If you manage employees, one thing Demsky recommends is to resist sending work-related messages outside of business hours.

There is no getting around not having a bad day but how we handle them in the evening may be the determining factor in how the day after.