A more satisfying sex life may be only a good night’s sleep away for women over 50, new research finds.

Researchers led by Dr. Juliana Kling of the Mayo Clinic in Scottsdale, Ariz., tracked data from nearly 94,000 women aged 50 to 79.

The investigators found that 31 percent had insomnia, and a little more than half (56 percent) said they were somewhat or very satisfied with their sex life.

Get Breaking News Delivered to Your Inbox

But too little sleep — fewer than seven to eight hours a night — was linked with a lower likelihood of sexual satisfaction, the findings showed.

“This is a very important study since it examines a question which has tremendous potential impact on women’s lives,” said Dr. Jill Rabin, who reviewed the findings. She’s co-chief of the Women’s Health Program at Northwell Health in New Hyde Park, N.Y.

Age played a key role in outcomes. For example, the study found that older women were less likely than younger women to be sexually active if they slept fewer than seven to eight hours per night.

Among women older than 70, those who slept fewer than five hours a night were 30 percent less likely to be sexually active than women sleeping seven to eight hours, Kling’s team found.

The findings highlight how crucial sleep is to many aspects of women’s health, medical experts said.

“Seven hours of sleep per night will improve sexual satisfaction and has been shown to increase sexual responsiveness,” said Dr. JoAnn Pinkerton, executive director of The North American Menopause Society.

Besides putting a damper on sex lives, she said, poor sleep is also tied to an array of health issues, such as “sleep apnea, restless legs syndrome, stress and anxiety.” Other health problems linked to insomnia include “heart disease, hypertension [high blood pressure], arthritis, fibromyalgia, diabetes, depression and neurological disorders,” Pinkerton added.

Dr. Steven Feinsilver directs sleep medicine at Lenox Hill Hospital in New York City. He reviewed the new findings and stressed that they can’t prove cause and effect. “It certainly could be possible that many underlying problems — for example, illness, depression — could be causing both worsened sleep and worsened sex,” he noted.

Rabin agreed, but said there’s been “a paucity of studies” looking into links between sleep and sexual health, especially during menopause.

“We know that obstructive sleep apnea and sexual dysfunction are positively correlated,” she said. “Other factors which may lead to a decreased sleep quality include: a woman’s general health; various life events, which may contribute to her stress; chronic disease; medication; and degree and presence of social supports, just to name a few,” Rabin explained.

And, “in menopause, and due to the hormonal transition, women may experience various symptoms which may impact the duration and quality of their sleep patterns,” Rabin added.

“We and our patients need to know that quality sleep is necessary for overall optimum functioning and health, including sexual satisfaction, and that there are effective treatment options — including hormone therapy — which are available for symptomatic women,” she said.

The study was published online Feb. 1 in the journal Menopause.