I have u to 50 muscle spasms a nite it wakes me up. In my legs and feet some last a 5 minutes could this be related to my gastric bypass surgery?

Nutrition. Gastric bypass surgery alters how your body absorbs nutrients, and can also cause dumping syndrome which can cause vital nutrients to be lost. Please speak to your doctor about this right away. Make sure you are taking a multivitamin. Good luck.
Maybe. Most likely this is from a lack of water but it could also be from a vitamin deficiency. Have those levels checked and start taking vitamins.