Pregnancy is a common time for women to experience leg cramps. To prevent leg cramps during pregnancy, it's important to maintain proper hydration levels, stretch your leg muscles regularly, engage in gentle exercise, elevate your legs when possible, and consider incorporating magnesium-rich foods into your diet. However, always consult your healthcare provider before making any dietary or exercise changes during pregnancy.