Medications like sildenafil (Viagra), vardenafil and tadalafil can be highly effective for treating erectile dysfunction, more commonly known as ED. Like other prescription medicines, the most commonly prescribed medications for ED work the best when they're taken in the right conditions.