I wonder if it was a "Charley Horse." These leg cramps can be excruciatingly painful as you describe but once they stop, your leg returns to normal without residual effects. They can often be caused by mineral deficiencies, or an electrolyte imbalance. Aside from this, I really can't say what else it might be.
The answers in online forums are for information only and are not intended to substitute for medical advice and care. Please see your personal health care provider for further evaluation of your individual case.
Debbie Miller, RN