I've noticed the same effect in my self and thus avoid sugar during preparation for any serious performances (and generally in life too). There are propably more complex reasons too, but I think one obvious one is that it increases the respiratory quotient, ie. the ratio of carbon dioxide produced per oxygen consumed.
Normally the RQ would be around 0.85. In a mode where you are metabolizing mostly fat, it would be around 0.70 and in "pure carb mode" 1.00. Which means that in extreme case, just by changing your diet, you will be producing up to 30% more co2 (realistically, the changes will not be so huge, but in theory...).
If the RQ is too high, to get the same comfort level you have to hyperventilate aggressively. So in the beginning your co2 will be much lower than normal (which is not good), yet in the end it will be through the roof. You get the bad effects in both ends. In the beginning your relaxation is ruined, hr is up. In the end, horrible contractions and a quickly building panicky feeling. Where as with a good, steady rise of a lower RQ you build up CO2 from the normal level slower up to your limit, staying in control.
Too low is not good either. In pure fat mode you will feel wonderful, but pass out sooner.
So the ideal static diet would include some complex carbs in moderation. So using common sense: avoid sugar, processed wheat, sweets, pastrys...Favor whole grain, veggies, fruit.
Too much protein has a similar effect on me. Especially protein supplements (whey). I still eat those during training season, but during "apnea season" I favor a balanced diet of "a little bit of everything but avoiding the obvious pitfalls".