The treatment of erectile dysfunction depends on the cause or causes. For instance, if the erectile dysfunction is caused by medications you are taking, changing some of the medications or their dosages may help.