This is a truly awful condition op, you have my sympathy.
I used to suffer this until I connected it with (for me):
A) eating too much food with gluten in within a time frame of around 2 days (Intolerant with lots of bubbling, bloated stomach, nausea, heavy sensation), this caused small crampy type pains within the gut, so by the time it got to the bowel there was full on stabbing daggers in there IYSWIM. So am now gluten free.
B) Being dehydrated, especially in Summer, so I make sure I drink plenty of water and eat liquid rich foods such as cucumber.
Warm wheat bag to hold in affected area helps to reduce spasm.
It won't help immediately, but once I realised I was heading for an attack, I would take some peppermint oil capsules, and a probiotic capsule 3-4 times throughout the day as I found they have a relaxing effect on my gut.
Also, drink lots of peppermint tea.
This would take around 24 - 36 hours to take effect.
Don't take painkillers to try kill the pain, as they can add to the constipation sensation.
I also avoid sugar in any form.
Plus, I've found if i keep the type of food I eat at a meal, and the times I eat them pretty regular, then there are no surprises for the gut. May sound boring, but rather boring than perspiring, twisted gut wrenching, teeth clenching, vomit inducing agony - no exaggeration there.
My longest attack was almost 3 days long, by comparison giving birth was an afternoon tea party.!