It has nothing to do with grapes, sugar, or sulfites... probably
One thing you might hear people pegging as the culprit of "Champagne headaches" is sulfites. Basically, they're just trace amounts of sulfur. But people think they must be bad because most American wines have labels that say "Contains Sulfites," and no one seems to know what the hell they are.
Sulfites are not the enemy. They essentially protect your precious alcohol from the outside influences of bacteria and oxygen. Without them, your wine would probably turn to straight vinegar. They are a naturally occurring byproduct of the fermentation process (meaning all wine will definitely have some level of sulfites, even if it doesn't say so on the label), and many winemakers will also add additional sulfite molecules to their products to help aid preservation. That's a good thing for people who hate skunked wine. And they definitely don't cause headaches.
"Sulfites can cause allergy and asthma symptoms, but they don't cause headaches," Frederick Freitag, associate director of the Diamond Headache Clinic in Chicago and a board member of the National Headache Foundation, told the Wall Street Journal.
In Champagne's case specifically, some attribute the headache symptoms to the higher-than-normal sugar content of bubbly. Others will claim some grape strains can trigger headaches by themselves.
But the science here is murky at best. There is no way to know what specific grape strains may cause a certain body to react negatively. And while sugar does dehydrate you -- which can lead to a headache -- the sugar content present in Champagne is probably not what is making your noggin pound. Especially if you don't usually get headaches when you eat a chocolate bar, for instance.
Actually, the real answer here is kind of obvious...