Yes, certain medications can cause or contribute to ED. These may include blood pressure medications, antidepressants, antipsychotics, and some cancer treatments. If you suspect your medication is affecting your sexual function, consult your healthcare provider for alternatives.