One theory is that these sudden painful muscle contractions are caused by dehydration. The lack of water leads to a reduction in salts (such as sodium, calcium and potassium) which are needed for muscles to work efficiently, says Priya Dasoju from the Chartered Society of Physiotherapy.
THE FIX: Gently re-stretch the muscle – ideally by walking. It’s also important to rehydrate yourself, so drink water of a soft drink. A potassium-rich banana may also help.
Source: Daily Mail Health Pages