Coffee lovers could have better sex lives, according to new research.

An exciting study has shown men who drink the equivalent caffeine level of between two and three cups of coffee a day are less likely to suffer from erectile dysfunction (ED), the University of Texas Health Science Center at Houston reported.

About 18.4 percent of men 20 years and older suffer from ED in the United States, which means it affects about 18 million men.

The findings revealed guys who consumed between 85 and 170 milligrams of caffeine a day were 42 percent less likely to report ED, and those who had between 171 and 303 milligrams of caffeine a day had a 39 percent lower risk of ED. These risk levels were measured in comparison to men who drank between zero and seven milligrams of caffeine per day.

"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, lead author and assistant professor at UTHealth School of Public Health.

The researchers believed this link can be attributed to the fact that coffee triggers a number of pharmacological effects encouraging the relaxation of the penile helicine arteries and the cavernous smooth muscle that lines cavernosal spaces; this can significantly increase blood flow.

The findings were published in a recent edition of the journal PLOS One, data for the study  came from the National Health and Nutrition Examination Survey.