Eating a poor diet can contribute to excess weight and related health conditions that can increase your chances of developing ED. Research confirms a link between diet and ED. Eating a healthy diet, quitting smoking, and reducing your alcohol intake can improve your overall health and erectile function.