Stretch abit before you sleep and try not to do a good big stretch (I know it feels super good after doing a good stretch but the cramps after that will make you regret this 😅).
Yes, I had leg cramps every now and then. Can try to stretch your legs before sleep, wear socks and raise your legs when sleeping. I ask my hubs to help me massage too 😅