Improper exercise techniques can cause a muscle pull leading to spasms or sometimes strenuous exercise can lead to sprain which might be a cause. If that's the case then you need to take rest for few weeks and apply hot fomentation to the painful regions. Sometimes people with a sedentary lifestyle,who have never done any hard workout will have muscle pain even for doing workout for 1-2days if that's the case, no need to worry.the pain usually subsides within few days if you practice excercises on regular basis. Start your exercise with a warmup exercises for atleast 15-20 mins which will help you to ease into your usual workout. Consume lot of water to stay hydrated and never compromise on that. If you restrict on water consumption,chances of dehydration and fatigue along with it is more. Consume proteinous and healthy foods like egg white, berries, fresh sprouts,skimmed milk,oats, brown rice, fresh vegetables.avoid junk foods,oily and spicy food. If not satisfied consult a physician.