Yes, certain medications, such as diuretics and statins, can cause leg cramps as a side effect.