Stretch Your Muscles
Prevent painful muscle cramps that are commonly referred to as charley horses by stretching out your muscles well before you start to exercise. If you have a particular muscle group that tends to get charley horses more than others, pay special attention to that area when you are stretching.
Some people have muscle spasms in their legs at night. If this tends to happen to you, try to do some simple calf stretches each night before going to bed. You can use a wall, bed or any other structure that can give you support. Putting your hands on the wall, stand with one leg in front of you with the knee bent and the other leg about shoulder-width behind it. Keep your back leg straight and make sure both of your heels are flat on the floor. Push on the wall and put some pressure on your front leg until you feel a pulling sensation in your back leg. You shouldn't feel any pain while you do this stretch. Switch legs so that you have stretched out both calves.
Avoid Becoming Dehydrated
Drink enough water throughout the day to ensure that you're not getting dehydrated. Water prevents your muscles from becoming tight and irritable, which can lead to cramps and spasms, even if you are not an athlete. Most experts suggest that between 48 and 64 oz. of water each day helps keep our bodies healthy. If you have trouble drinking that much plain water, you can flavor it with lemon or a sugar-free drink mix to make it more palatable.
Charley horses may be caused by a drop in your potassium levels, so it's important to get your daily allowance of the element. Bananas are a good source of potassium, but if you don't like them, choose other potassium-rich foods, such as yams, avocados, spinach, papaya or lentils.