Sleeping poorly due to job stress? That may be due to a lack of support from co-workers and higher-ups, a new study found.

However, receiving improved psychological and social support at your job allows you to more easily shut off from the workday, thus giving you precious downtime to de-stress and improve sleep, according to the study.

"This study highlights the important role that workplace environment and stress have beyond the setting of work on overall well-being," said Dr. Phyllis Zee, chief of sleep medicine at Northwestern University Feinberg School of Medicine in Chicago. Zee was not involved in the study.

"Initiatives to improve well-being in the workplace can improve sleep, but at a personal level, what we can optimize is our sleep quality — which in turn can help to handle stress and ultimately increase resilience to daily challenges we face," Zee said.

LEADERSHIP COUNTS

The study, , analyzed data on nearly 115,000 participants in the Swedish Longitudinal Occupational Survey of Health, the Work Environment and Health in Denmark study, and the Finnish Public Sector Study, who were followed for up to six years.

Researchers looked at top-down resources — leadership qualities, such as appreciation and the ability to listen, and procedural justice, which is the perception of fairness in the workplace — and horizontal resources, such as support from co-workers and a collaborative culture. Collaboration was defined as working closely with others to achieve the best available results or to develop or apply new ideas.

Sleep problems included initiating or maintaining sleep, poor-quality sleep and daytime tiredness two to four times a week that lasted one month to three months. Confounding factors, such as age and pre-existing physical or mental disorders, were factored out.

Within a two-year period of time, over half of the participants (53%) reported changes in their workplace environment. If changes were positive in either of the two categories — leadership and fairness or co-worker support and collaboration — the odds of persistent sleep problems declined. The biggest decline occurred when a person saw improvements in all four areas at the workplace.

However, if the changes at work were negative, sleep issues increased — in fact one in four people in the study with a worse job environment developed problems getting enough rest.

"Our findings justify future intervention studies to examine the extent to which improvements in workplace psychosocial resources could facilitate remission or recovery from sleep disturbances and prevent development, deterioration, or prolongation of sleep disturbances among employees," wrote corresponding author Tianwei Xu, a postdoctoral student in epidemiology at Stockholm University in Sweden.

Having negative changes in the leadership and fairness sector was associated with the greatest long-term impact on sleep, more than negative changes in co-worker relationships or collaboration, the study found.

"This finding is plausible, considering the greater power of leaders to affect a positive working environment," Xu and her co-authors wrote.

HOW TO FIX THE ISSUE

Once the bed and bedroom have become associated with bad slumber, anxiety can increase just by entering the room where sleep is elusive, experts say. Bad sleep habits, such as eating, working, watching TV and worrying in bed can solidify that negative association.

can help overcome the connection between wakefulness and the bedroom by training the mind to see the bed and bedroom as a place for good sleep, while eliminating cues for activities that interfere with falling asleep.

Can't fall asleep? One of the first things to do: get up if you haven't fallen asleep within 15 or 20 minutes, experts say. Keep the lights dim and stay away from blue light emitted by electronics — watching TV or using a smartphone or computer will only send the brain a signal that it's time to wake up. Do something mindless, like folding socks, until you feel sleepy. Only then can you go back to bed.

Mind racing from work worries? Whatever you do, don't worry in bed, said sleep specialist Dr. Raj Dasgupta, an associate professor of clinical medicine at the Keck School of Medicine at the University of Southern California.

"Schedule a 'worry time' — a period of time outside of the bedroom, outside of sleep, to worry about the things that naturally creep in your mind at night," said Dasgupta, who was not involved in the study.

Sleep researcher Dr. Vsevolod Polotsky, vice chair for research in the George Washington University department of anesthesiology and critical care medicine, gave CNN this advice in a previous interview: "Write down a list of things you need to do tomorrow. You can even email it to yourself."

Deep breathing is a  way to calm both body and mind. By changing the rhythm of your breath you slow your heart rate, reduce blood pressure and stimulate your body's parasympathetic "rest and digest" system. One of the most popular deep breathing techniques, the 4-7-8 technique, can easily be done before you turn out the light. Try the relaxation exercise again if you wake during the middle of the night.

Another proven technique is progressive muscle relaxation, experts say. Tightly tense muscles in various areas of the body for 10 seconds while breathing in. Strive to squeeze each muscle hard, but not to the point of cramping or pain. Then, as you breathe out, relax the muscle suddenly and all at once. University of Michigan Health recommends you do the exercises in a systematic order of the body .