Yes. Some medications may be the cause for leg cramping. If you’re taking a medication that’s a known diuretic (a medicine that causes frequent urination) it may play a part in causing dehydration and thus may aggravate cramping.