Did you ever take SSRI (Antidepressants), Propecia/Finasteride (Anti-hairloss) or Accutane (Anti-acné) anytime in the past?
Do you watch too much porn? Masturbate frequently? Check your testosterone. Also other health issues, although it may be the stress.
Go to your MD have your testosterone level check. Make sure no heart or diabetes problem,or hypertension. Penis need constant supply of blood to keep erected.