I have severe legs cramping, thigh, foot, calf. When this happens if I am completely immobile. What could it be?

Leg cramps. There are quite a few things that can cause leg cramps...Electrolyte issues k+ in particular, peripherial vascular disease, compartment issues, pronation of your foot..To mention a few...And all of these are treated completely differently... Age and medical history plays a big part... See you family doctor, let him examine you, to get the road to recovery started..
Severe? If severe i think it warrants a visit to the doc. You can possibly be dehydrated, you can have a magnesium deficiency, you can have a potassium imbalance, you might be on a medication like Lipitor (atorvastatin) (this is one of the side effects.) get it checked out.