Drinking plenty of water and eating healthy foods that are abundant in calcium, potassium and magnesium can reduce or eliminate night cramps, according to WebMD. Limiting or avoiding alcohol is a preventative measure for night cramps, as are engaging in daily exercise and stretching before bed.
Stretching and massaging the affected muscle can stop a muscle cramp in progress, states WebMD. Heat and cold therapy are also effective, as are over-the-counter pain medications. Doctor-prescribed pain medications must be used exactly as ordered. Muscle cramps can be caused by muscle injury, dehydration, pregnancy and underlying medical conditions that reduce blood flow. Long periods of either standing or sitting are also known to cause muscle cramps.