Science has now proven that not only does coffee keep you up at night, it keeps you up at night (if you're a man). Researchers at the University of Texas Health Science Center at Houston (UTHealth) have published results indicating that men who consume the caffeine present in two to three cups of coffee daily are less likely to suffer from erectile dysfunction (ED).

The team found that men who consume between 85 and 170 milligrams of caffeine daily-the amount present in two or three cups-were 42 percent less likely to experience ED. Consumers of 171 to 303 milligrams of caffeine daily were 39 percent less likely to experience ED. Compared with those who missed the era of coffee achievers there is a significant difference: those who consume zero to seven milligrams of caffeine each day are the baseline from which the 42 and 39 percent differences deviate.

The trend found in the study extended to hypertensive, obese, and overweight men, but not to men with diabetes:

"Even though we saw a reduction in the prevalence of ED with men who were obese, overweight and hypertensive, that was not true of men with diabetes. Diabetes is one of the strongest risk factors for ED, so this was not surprising," said David S. Lopez, Dr.P.H., M.P.H., lead author and assistant professor at UTHealth School of Public Health.

The authors of the study believe that the biological mechanism for this effect is that caffeine triggers the relaxation of the cavernous smooth muscle that lines cavernosal spaces and the penile helicine arteries via a number of pharmacological effects. This relaxation effect in turn leads to increased blood flow to the penis.

Dr. David Samadi, chair of urology at Lenox Hill Hospital in New York City, agrees. "More research is needed, but what scientists think is happening here is that coffee and caffeine are causing cavernous smooth muscle tissue (found in the penis) to relax, allowing more blood flow to the area and leading to improved erectile function."

The ED data used in the study came from a single question among many in a computer-assisted interview for the National Health and Nutrition Examination Survey. Caffeine sources need not come from coffee; in the study they also included soda, tea, and sports drinks.

"These findings also support the latest U.S. Dietary Guidelines Advisory Committee position that drinking three to five cups a day reduces the risk of type 2 diabetes and heart disease; two conditions that are well established as significant risk factors for erectile dysfunction," Dr. Natan Bar-Chama, director of Male Reproductive Medicine at the Mount Sinai Hospital in New York City, told CBS News.

18.4 percent of American men 20 years and older experience ED; this means more than 18 million men are affected by ED. Previous research indicates that more than 85 percent of adults consume caffeine.

The study was recently published in PLOS ONE here.