Hello.
Asthma may lead to some circulation problems in various organs of the body including the sexual parts. The erectile tissue needs a rich amount of oxygen supply to function properly. In asthma, oxygen levels may not be maintained and this is supposed to affect the erection.
Your problem is less likely to be due to medicines.
Please consult your physician about adequate control of your asthma. It will also help if you identify any anxiety associated with masturbation or sexual activity. Reducing the anxiety helps in most instances.
Regards
This post is for the purpose of providing medical information and is not a substitute for a face-to-face consultation with a doctor. This post is not intended to give or rule out a diagnosis, create a doctor-patient relationship or replace an existing one.