Heya.
I have the same problem especially when I wake up in the morning. I also switch between both and have the urges to go to the loo which can be a nightmare if you can can't. I have been to the dr about it a few times and they are certain it is IBS.
Only my pain is all in my left side where my bowel.
THere are a few things you can have to help, Like I take Buscopan which relaxes the system. IBS can often be caused by spasms. I sounds gross but I often used laxatives or Immodium depending on how bad the day is.
Also look into what you are eating. There is food I stay well clear of such as ones with lots of fibre, large quantities of acidic food, and fatty foods.
I am no expert but I hope that clears up something for you.
Have a good christmas and I hope your problems don't persist for to long.