Can’t sleep

So, I woke up about 3:30 am with horrible legs cramps and now I can’t go back to sleep. Anyway to stop these cramps