At what age does myocarditis occur?

Any age. It may occur at any time, from infants to the elderly.
When it Does. Myocarditis is most commonly caused by viral infections, and there's no preset age at which those occur. It's when you get exposed to a virus you don't already have immunity to.