Leg cramps can be triggered by certain foods, such as processed foods, refined sugars, caffeine, and alcohol. Eating too much of these foods can put strain on your body, leading to cramping. It can also be helpful to eat foods with higher levels of magnesium, such as nuts, spinach, and bananas...