Cramps are most often a result of sudden temperature changes (which is why some people get cramps when they jump into cold water at the swimming pool), nutrient imbalances/deficiencies (electrolytes or minerals), overuse of a muscle (such as during sport) or poor circulation.
I couldn't say which applies to you but if you have your suspicions, the remedies are as follows:
- Temperature changes - some gentle stretching and kneeding
- Nutrient imbalances - either or magnesium iron deficiency (especially night time cramps or restless legs) or prevent dehydration
- Overuse - start off gently and warm down after exercise and try to take a break and stretch afterwards
- Poor circulation - Ginkgo Biloba
Try to gently stretch the affected muscles before bed. The feet are tricky but if you adopt a crouched position but on the balls of your feet, that will stretch the tendons and muscles in the arch of the foot. Similar idea for the hands at work.
Hope this is of help