Any suggestions on how to avoid getting leg cramps when sleeping at night??

I had the most horrendous cramps, waking me up twice through the night. I have heard that a lack of salt in the diet can cause cramps, but I have never added salt to my food &never had a problem before.

I just know there is a thread here about this, but I have searched & searched but can't find it. I think maybe it was Tootie or Christy that was asking about it?? (sorry guys, can't remember who)