It doesn't sound sexually-transmitted to me--more likely the bumps are irritated by sex. I think hydrocortisone is a good dea, plus gentle cleansing and lubrication before and after sex. If it keeps bothering him despite these measures, he should see a doctor.
Take care.
Dr. Rockoff