Lacking enough of the sunshine vitamin might snuff out the lights on your bedroom game.  New research from Italy suggests that low levels of vitamin D may increase your risk of erectile dysfunction.

When researchers tested 143 men with varying degrees of erectile dysfunction, they found that nearly half of them were coming up deficient in D, and only one in five had optimal levels of the nutrient. What’s more, men with severe cases of ED had vitamin D levels that were about 24 percent lower than those of men with mild forms of the condition. 

Insufficient levels of D may spur the production of free radicals called superoxide ions, according to study author Alessandra Barassi, M.D., and her research team. These free radicals deplete your nitric oxide, a molecule that helps your blood vessels function properly. The result: It makes it hard to, well, get hard. 

“Nitric oxide causes the blood vessels to relax, which increases the blood flow and causes an erection under normal circumstances,” says Larry Lipshultz, M.D., a Men’s Health urology advisor.  Without the necessary amounts of nitric acid, though, your blood vessels may not relax enough to allow for an erection.

If you suffer from ED, ask your doctor to check your vitamin D levels. For ED patients with low levels, the study recommends taking supplements to get back to the optimal level of 30 ng/mL or above.

As for men with normal erectile functioning, Dr. Barassi says she’s currently studying whether vitamin D supplementation may act as a preventive measure to delay ED.