You would need to re-frame this question giving your age and separating your sleeping tablet history from your ED because they are not necessarily connected. You would need to say to what extent your erectile dysfunction interferes with your ability to perform sexually and what medications if any that you have tried. Thank you and good luck.
If you don't smoke, get tested for diabetes.
I would suggest L-arginine, pumpkin seed supplement, and exercise. If you smoke, that's the cause. It is ruining your vascular system.