Thank you for the information,
This can be due to muscle spasm or cramps
Muscle spasms usually comes from dehydration, low electrolytes like calcium, magnesium, potassium, sodium, vitamins, dystonia etc.
It can also be present in diabetes, hypothyroid state.
Poor circulation , some medicines also can cause muscle spasm.
You may try some home measures-
Take plenty of fluid, fruits, vegetables .
Regular exercise or a walk daily to keep you active.
Stretching or gentle massage can also be helpful.
Avoid coffee, alcohol, tobacco etc. if you take them.
If it is persisting for a long time you should consult a neurologist or your doctor for investigation to find out any causative factor and treat accordingly.
Please feel free for any follow up query.