Cramping in mornings

I’m almost 38 weeks and every time I wake up in the morning I get cramping so I pee and it doesn’t go away, it lasts for about 20 mins to a half an hour after than subsides, what is it ?