I have done several marathons.
In the morning before a run I relax, drink a couple of cups of coffee, and make sure I go to the washroom before the run. As much as possible I try get into the habit of going in the morning. I take a couple lomitol before I run, and a couple at night. Even in a flare that ussually regularizes my system enough that I go at semi-regular times.
But despite my best efforts UC shows up on runs sometimes. If in a flare I found it a good idea to go on a 20 minute warmup (on a treadmill, or track near a washroom) before the real run, then use the washroom right after. That ussually gets my system empty and prevents cramping and bathroom stops on the real run. Also a good idea to know the route and possible bathroom locations (woods, gas station etc.). If you are running with a group also look for some short cuts on the route just in case you have to stop.