Dr. Cohen talked about it a lot how EM and migraines can actually be one in the same. Much like how EM can stem from blood vessel contractions and dilation, IBS can stem from the same thing and cause contractions in the intestinal tract causing pain in the abdomen area.
Here is a good post that covers his thoughts on the correlation to migraines. Dr. Jay Cohen - EM Resource