Thanks for query,
Sex is in our mind.The sexual act has direct relation with anxiety
if we relax parasympathetic nervous system
is stimulated causes sexual arousal erection etc.
does not affect the erection.
As he had no other habits he should require to reduce anxiety.