Leg cramp

Has anyone ever had one of those Charlie horses in their leg while sleeping? I haven’t had one in years but now that I’m pregnant I’m guessing that’s why I got one?