Headaches after eating?

I'm 27 weeks and for the last month or so anytime I eat a potato or a lot of sugary food (like 8-10 oreos) I get horrible headaches that turn to migraines within 2 hours of eating. I havent noticed it when eating my vegan icecream although I only eat a few bites at a time of that, nor have I noticed it with any other sugary treat I've indulged in during pregnancy.. anyone have any idea as to why?