Getting hitched could be just what the doctor ordered.
Senior Couple Hugging in Living Room
Credit: Hero Images/Getty Images

Turns out, marriage isn't just good for the heart—it's good for your brain, too. Researchers in the U.K. recently revealed data that suggests spending your golden years with a partner lowers your risk of dementia.

In 15 separate studies surveying more than 812,000 people worldwide, researchers found that those who lived alone increased their chances of developing Alzheimer's and other forms of dementia by 42 percent, after accounting for other risk factors like age and sex. Those who were widowed after residing with a spouse also increase their likelihood of suffering from mental lapses by approximately 20 percent.

Researchers concluded that marriage fosters a consistent social connection and a communal interaction with another person on a daily basis. This day-to-day communication can serve as somewhat of an intervention to slow cognitive aging or reduce the risk of dementia.

"There were fairly well established health benefits of marriage, so we did expect there to be a higher risk in unmarried people," said lead study author Andrew Sommerlad, a geriatric psychiatrist and research fellow at University College London. "But we were surprised by the strength of our findings."

Of course, avoiding dementia involves more than simply saying, "I do" to your beloved. The study concluded that there is a direct correlation between marriage and dementia risk, but there are other factors that can lead to symptoms of dementia, like smoking, drinking alcohol, and not exercising.

"We don't think it is marriage itself which reduces the risk, but rather the lifestyle factors that accompany living together with a partner," Sommerlad explained. "These include a more healthy lifestyle—taking better care of physical health, diet, exercise, but also the social stimulation that comes with having a partner to talk to."

The study also cited stress over losing a loved one and going through a divorce as factors that contribute to cognitive decline. When we're stressed, the neurons in the hippocampus, which is associated with memory formation, learning, and our emotions, are negatively impacted. Although the study doesn't reference what the unwed and widowed can do to reduce their risk of dementia, Sommerlad offered some advice.

"In a society where isolation of older people is becoming more common, steps might need to be taken to connect older people back together—to reduce social isolation," said Sommerlad.

WATCH: Marriage Advice from Couples Who've Been Together Over 40 Years

The results of this study were detailed by the University College London in the Journal of Neurology, Neurosurgery & Psychiatry.