does gas cause cramps?

I'm wondering if gas causes cramps? I am 9dpo and I woke up with some terrible cramps! When I farted it was less painful.