interesting. i have also noticed that i don't get this problem anymore, but what was mainly causing it for me was energy drinks, combined with, probably, a lot of barley malt, so, yeah, gluten there.
idk hwat it is, inositol, glucuronolactone, one of those. has some interaction with the immune system, and i think that what's happening is inflammation in the visual cortex.