As we age, circulation to our legs slowly becomes restricted, and the sedintary lives we live only makes this worse. It our bodies way of letting us know we need more exercise. If the problem persists talk to your doctor, as it could be a sign of serious health issues.
If its a crampy pain drink water with electrolytes--also eat a banana which is a great source of potassium. Some Tylenol and/or ibuprofen should take care of the pain and inflammation if you've over done it.