Red wine and tea are rich in compounds called flavanoids and anthocyanins, which also occur naturally in cherries, blackberries, radishes, blackcurrants and blueberries.
A diet rich in flavanoids and anthocyanins helps reduce the occurence of erectile dysfuntion by 14%, the study, published in the American Journal of Clinical Nutrition, found.
Citrus fruits contain chemicals called lavanones and flavones which peform the same function.
Combining such a diet with regular walking reduces impotence by up to 21%, the research indicated.
The study, conducted jointly by the University of East Anglia and Harvard University, tracked the diet of over 50,000 middle-aged since 1986.
The men were all in otherwise good health.
Over 30% of the cohort reported experiencing erective dysfunction, but the incidence was much lower among those with a diet high in these chemicals.
Professor Aedin Cassidy of the University of East Anglia, who led the study, said: “We already knew that intake of certain foods high in flavonoids may reduce the risk of conditions including diabetes and cardiovascular disease.
“The great thing about this study is that the benefits for reducing risk of erectile dysfunction can be found by including a few portions of fruits people already eat.
“Flavonoids are present in many plant-based foods and drinks including fruits, vegetables, tea, herbs and wine.”
Erectile dysfunction is often an early indicator of heart problems, and early intervention may help reduce cardiovascular disease, heart attacks and heart-related fatalities.