I used to get them a lot during runs in boot camp. The DS told me it was because I was inhaling too deeply and not exhaling all the way. Now that I'm not 18, I don't know if that was true or if it was just some canned answer from some army training manual somewhere written 50 years ago and being regurgitated year after year, but changing the way I was breathing in such a way that I was never gasping for air (ex. on a long run, force yourself to breath in a certain way; in through your mouth for 2 steps, hold for 2 steps, out through your nose for 4 steps, and not changing for anything the entire duration of the run) worked for me.
I'm not sure if thats what it was, or if it was just the fact that I was concentrating so hard on not messing up the breathing pattern that put me in the zone. Either way, maybe it'll help.