If you are among those who lie awake counting sheep instead of sleeping soundly, you should know that longstanding insomnia may be more than just annoying; it can be a hazard to your health.

When you have insomnia, you may have difficulty falling asleep or staying asleep. Some awaken often during the night, or they awaken too early in the morning before they’ve had sufficient rest.

Insomnia can be caused by underlying problems such as illness, medication side effects, mental health issues, pain, and substance use and abuse. Or it may have no identifiable cause and may just occur without explanation or warning.

Experiencing a brief period of sleeplessness, perhaps because of worries about a particular event, is not a major health concern, though you should take steps to make sure your body — and brain — get the sleep they need.

If you consistently have trouble obtaining restful sleep, you may be irritable, perform poorly in school or at work, and feel tired during the day. You are also at risk for becoming overweight and obese and abusing substances.

The worse a person's insomnia was, the higher their risk of stroke.

Sleep has been called the brain's housekeeper, and a recent study shows that the chronically sleepless have an increased risk of stroke.

Researchers followed 85,000+ people over a four-year period to see how a history of insomnia influenced their incidence of stroke. About 21,000 had insomnia and 64,000 did not. The study groups were divided by age: 18 to 34, 35 to 49, 50 to 64, and over 65.

The researchers distinguished those with ongoing insomnia from folks who had improved and then relapsed and from others who had not had any sleeplessness for at least six months.

Across all age groups, the risk of stroke was significantly higher for insomniacs than sound sleepers, and this effect was most evident in the youngest age cohort (18- to 35-year-olds). The worse a person's insomnia was, the higher their risk of stroke. Those subjects with persistent insomnia had more strokes than those with relapsing symptoms. The group whose insomnia had resolved for at least six months did the best of the three groups of poor sleepers.

The authors suggest that sleep deprivation may impact the cardiovascular system by upsetting inflammatory, hormonal, and metabolic pathways. Previous studies have linked inflammation and sleep loss and suggested that inflammatory chemicals, such as cytokines and interleukins, may be increased in the body and then act on cardiovascular tissue in a way that sets the stage for stroke.

Identifying and treating insomnia is a key component of cardiovascular health. As the researchers point out, it is one strategy for lowering your risk of stroke.

There are many ways to treat insomnia. It is wisest to start with lifestyle changes such as reducing your caffeine and alcohol intake and adopting effective sleep hygiene practice such as removing screens and media from the sleeping area. Other approaches include yoga, meditation and mindfulness training, and psychotherapy to address stresses associated with insomnia.

Prescription medications and over-the-counter products such as melatonin are best used with the advice and follow up of a health care provider. Your doctor may also diagnose possible medical reasons for your sleeplessness and then, hopefully, manage safe and effective treatments.

A good night’s sleep is an important — and achievable — health goal for all. The study is published in the journal, Stroke.