Cramp in legs at night

Someone please tell me there’s something I can do to prevent it or ease it or something because its extremely painful every night. Last night I had cramp in my left leg 7 times in a row. I needed to go to the bathroom but every time I moved my leg it cramped up and made me actually scream out in pain. My partner woke up thinking I was being murdered or something lmao. I’m only 19 weeks and I don’t know if I can do this every night for the next 20 weeks it’s torture