A new study suggests that those little blue Viagra pills may also help women.

Researchers have found that sildenafil citrate, the main ingredient in Viagra, Revatio and other drugs used to treat erectile dysfunction, may alleviate moderate to severe menstrual cramping in women.

"It seems counterintuitive, but what sildenafil citrate does is dilate blood vessels," said Richard Legro, a gynecologist at Penn State College of Medicine and one of the authors of the study. "It leads to an erection in men, but in women, we think it can be an effective treatment for acute menstrual pain."

The agonizing cramping, dysmenorrhea, is caused by the excess production of prostaglandins, a lipid compound that tells your muscles when to relax and contract.

The extra prostaglandins with menstruation are responsible for abnormal uterine contractions as well as increased sensitivity of pain receptors, the researchers explain in the journal Human Reproduction.

Legro and his colleagues hypothesized that if the blood vessels around the uterus were dilated, then the increased flow of blood might flush out those pain-causing prostaglandins.

"It's like how a good rain can clear up smog," Legro said.

This is just the first study to test the ability of sildenafil citrate to relieve menstrual crams, and more research needs to be done.

Read more from Los Angeles Times.