Muscle pain can be due to some improper warm up or cool down during exercise or due to any work which you had not done before .. also if you have not done Proper stretching exercise than the muscle goes in spasm..
Next Steps
You need to visit a physiotherapist for the same for Proper technique to stretch the ms as this onset is 2 months before
Health Tips
You can apply any pain relief gel and apply hot pack before stretching which allow the muscle to contract and relax properly. Don't massage the area as incorrect massage can damage the tissue .