Ryan McVay | Getty Images (Ryan McVay | Getty Images)

Something that you can do in your sleep would seem to be pretty simple, but getting an erection is actually a complicated business—a complex biomechanical process that requires your body to be firing on all cylinders, three to be exact. (Note: It's best not to think of this as a "complicated business" when the moment presents itself.) First, testosterone, which fuels male arousal, should be pumping at healthy levels. Second, a strong immune system will scrub away free radicals, keeping arteries clear and free of inflammation. Third, blood vessels should dilate easily so that blood pressure is regulated and blood flows easily. This last mechanism relies on the production of one chemical, nitric oxide, which, not coincidentally, is the key target of all the major pharmaceutical treatments for erectile dysfunction (the accursed ED), from Cialis to Viagra.

Simply put, a healthy heart equals a healthy penis. "If your cardiovascular system is impaired, your penile health is impaired, and the reverse is true as well—it's one system," says Steven Lamm, M.D., a clinical assistant professor at New York University School of Medicine and the author of The Hardness Factor. "The endothelial cells that line your coronary arteries line all the arteries in your body, including the arteries that go to the penis."

Your endothelial cells are crucial for releasing nitric oxide—and good nutrition is one of the central factors influencing its production, according to a study in the American Journal of Cardiology. Which is good news, since ED pills come with an ever-growing list of side effects: heartburn, chest pain, memory loss, vision loss, and hearing loss. "The right foods will help you stay well and reverse small vascular abnormalities before you have no choice but to use medications," Lamm says. So forget the pills—here's a list of 15 edible goodies that will keep your manhood in perfect working order. Open the fridge and the cupboard, and let the magic happen.

More from MSN Healthy Living: