THURSDAY, Sept. 29, 2016 (HealthDay News) -- People with migraines and other headache disorders have a greater risk of a thyroid disease known as hypothyroidism, a new study suggests.

Hypothyroidism occurs when the body doesn't produce sufficient amounts of thyroid hormone. This can cause mood swings, weight gain, hair loss, fatigue, constipation and irregular menstrual cycles, according to researchers at the University of Cincinnati College of Medicine.

The study included more than 8,400 people. The volunteers were followed for 20 years as part of a medical monitoring project.

People with pre-existing headache disorders -- such as cluster or tension headaches -- had a 21 percent higher risk of hypothyroidism, the investigators found. And people with a possible migraine disorder had a 41 percent greater risk.

The findings suggest that people with migraines are particularly susceptible to hypothyroidism. However, the study doesn't prove that one condition causes the other.

Migraine affects about 12 percent of Americans. Hypothyroidism affects about 2 percent. The conditions are rarely life-threatening. But these conditions can cause decreased quality of life if patients don't get adequate treatment, the study authors noted.

"It is possible that the development of hypothyroidism in a headache patient might further increase the frequency of headache, as past studies have found that treatment of hypothyroidism reduces the frequency of headache," study co-author Dr. Vincent Martin, a professor of medicine, said in a school news release.

"Regardless, physicians should be more vigilant in testing for hypothyroidism in persons with headache disorders," concluded Martin. He's also co-director of the Headache and Facial Pain Center at the UC Gardner Neuroscience Institute.

The thyroid is a gland at the base of the neck that is part of the endocrine system. Thyroid hormones control the rate of many of the body's activities, including heart rate and how fast you burn calories.

The study was published online Sept. 27 in Headache: The Journal of Head and Face Pain.