Like other prescription medications, Xanax may cause erectile dysfunction (ED) because of how the drug affects the central nervous system (CNS). However, there are many reasons why ED may occur.