Hi,
Thanks  for  your query.
After going through the description, I understand your concern regarding your symptoms. Most of the time, spasms occur for no known reason, and they're usually harmless. In general, these are likely to be related to 
muscle fatigue and 
nerve problems.
Infact, till date there is no clear cut evidence for the cause of 
muscle cramps. But the most common cited theories include -
- Altered neuromuscular control
- Dehydration
- Electrolyte depletion
- Poor conditioning
- Muscle fatigue
- Doing a new activity
Self-care Activities that might help prevent night 
leg cramps include:
• Drinking plenty of fluids to avoid dehydration
• Stretching your leg muscles or riding a stationary bicycle for a few minutes before you go to bed
• Massaging the cramped muscle with your hands or with ice
• Walking or jiggling the leg
• Taking a hot shower or warm bath
• Foods such as bananas, potatoes, prune juice and dried fruit may be helpful in relieving muscle cramps
I do hope that you have found something helpful and I will be glad to answer any further query.
Take care