Many times the reason for cramps is due to the lymph system being to acidic in that area.
Many people will notice they get cramps at night when their oxygen levels drop.
Sodium or Potassium may temporarily help because they are alkalizing but until you get the balance right of calcium, magnesium, sodium and potassium, your muscles will always be one step away from more cramps.
You can either eat high brix in season foods or mix your alkalizing drinks where the acids in your digestion will react with the alkaline minerals to create the electromagntic energy your body needs to combat the cramps.