What is good medicine for IBS when it is acting up?

Calming your gut. There are prescription anti-spasm medicines. Herbal remedies also include peppermint oil capsules. Figuring out and avoiding your food triggers is the bigger piece. Hope you're feeling better.
Fiber, water. There are prescriptions to help with spasms (levsin (hyoscyamine) is a common one) but often symptoms can be helped with fiber, water, and stress reduction.