Caffeine opens up blood vessels in the body, which may improve blood flow. Caffeine may also help relax smooth muscle tissue in the penis. In theory, that might make it easier to get and keep an erection. A 2015 study looked at the connection between caffeine and ED in more than 3,700 men. The men who drank 2 to 3 cups of coffee daily had a slightly lower rate of ED than non-coffee drinkers. However, the same authors did a much larger study (of more than 21,000 men) in 2017. This time, they found no link between drinking coffee and ED. So, while coffee has many benefits, curing ED isn’t one of them.