I get them lots a side effect of diabetes. Don't sleep with legs curled up ( cuts off blood flow) abd drink lots of fluids also check to see if you need more calcium. I have to take a supplement at night but not many leg cramps.