I think Millsy has actually given the solution in an earlier post- diet.
It sounds to be like you are maybe eating too close to your run or eating the wrong things, some people need to allow 3 hours or even more between having a meal and running.
I know bananas are a favourite meal for runners but they sometimes upset my stomach, i would keep a diary of what you are eating and come back on here for a bit more advice. Or even better maybe going to see a dietician/nutritionist.
On the day of the marathon you will probably need the toilet quite a lot before the race, this is normal, its just nerves!
It should settle down once the race is underway though.
Edit- something else i thought of ,
Are you taking on energy drinks/gels/sweets etc during your run? This could be potentially causing the problem too, when exercising the stomach needs blood to help break down the sugars that we take in, if someone is working really hard not enough blood can get to the stomach to digest the food because as it is being used elsewhere. This is usually when upset stomachs occur. Maybe try running at a slower pace see if that makes a difference.