Night cramps in the legs and feet are a common ailment. Your doc will probably blame it on poor circulation - but DO check it out with him.
I get it in my feet mostly - my big toes decide they want to point upwards (but Im not ready for turning my toes up yet

)
I have found that the number of times I get these night cramp attacks has reduced a lot if I take Gingko Biloba daily. It is herbal medicine - beware it should not be taken if you are on blood thinning meds.
I also have a foot massager ready in the bedroom - this is a foot spa which can be used dry and vibrates. (heaven knows what the irishman in the flat below me thinks when I set it off in the middle of the night

)