Cramps but no period

So I keen getting pains in the stomach, like when you’re on your period. I happens almost every night and I’m unsure why

What are some things I can do to stop them happening?

And why would they be happening?

I’m on the pill, and I’m not pregnant 🤷🏼‍♀️ I got off my period last week