Cramping feeling?

I've had a really weird cramping feeling today, like my period is due. I have recently come off the pill but I experienced the same feeling + spotting a couple of weeks ago while I was still on the pill. Any idea what this could be?