Could be due to lack of proper hydration. Could be lack of electrolytes, most particularly magnesium and potassium. There are electrolyte drinks and supplements, but watch out for very high sugar content that cancels it out by increasing inflammation, such as Gatorade. Bananas are a great source of potassium and green leafy vegetables are a great source of magnesium. It could also be you're overdoing it for your level of fitness. It could also be you're not warming up sufficiently or stretching properly. Only one of these possibilities would be helped by supplementation.