@goldenbear,
It may be something temporary. However, if the symptoms come from time to time indicates that is becoming something chronic, and this might causes you problems thru the years.
If the symptoms last a short period of time and come back no more, then whatever that it caused them is gone. It may be because you slept forcing your leg to certain position, perhaps because you hurt your leg doing something, maybe because you are losing its normal flexibility because many reasons.
The answers to your question are given better by searching your condition with your age, your general health, your body motion everyday, and more.
First things first. Wait for a few days and check if the symptoms disappear. If they don't, then review what it might caused them. If no idea, then you might consult a doctor. Between all this period of time, you can try over the counter pills for pain if any, or hot compresses.
Hope it will heal by itself.