Summarize this article:

Proper hydration is key to preventing muscle cramps. If you're prone to muscle cramps, you may not be getting enough water. Work on upping your water intake throughout the day. Start off your day with a glass of cold water. Carry a water bottle with you to work or school. Sip it throughout the day. Take advantage of water fountains. Each time you see a water fountain, stop and take a sip. If you dislike the taste of plain water, try flavoring water naturally with fruit and vegetables. Many people experience cramps in bed. If you're prone to leg cramps during the night, make sure to give your legs a good stretch before getting into bed. Some light exercise before bed can also help stretch muscles and prevent cramps. Go for a light jog or walk before bed or ride a stationary bike for a few minutes. A lack of calcium or potassium in the diet can potentially cause muscle cramps. Upping your intake of both may help prevent cramps. Go for low-fat dairy to increase your calcium intake. Opt for things like yogurt and skim milk. To get more potassium, get foods like turkey, bananas, potatoes, and orange juice. While further studies are needed to confirm this, some evidence indicates drinking pickle juice can help with muscle cramps. It's possible that pickle juice affects nerves in the stomach and throat, which can send out signals that disrupt muscles and cause cramps. If you don't mind the taste of pickle juice, you could try drinking it to see if it lessens cramping.
Drink more water. Stretch or exercise your muscles before bed. Consume more calcium and potassium. Drink pickle juice.