hufty has it right, the ketchup analogy is perfect....guaifenesin increases the volume of mucous and also decreases its viscosity allowing it to drain. combined with a NSAID or something like flonase gives you the double hit of reducing inflammation which reduces swelling in the eustachian tube and nasal passages. reduced swelling = increased diameter of the tube for better drainage.
i would still do it under the care of a physician; i remember the dosing being quite high for blocked ears. i think mine was 1600mg and it took like ~ 3 weeks before i saw the difference. if you're flying a lot you may see improvement a bit quicker since the pressure changes will move things around a bit.
both Carbocisteine and guaifensin are mucolytics, meaning they break down the bonds holding mucous together. i think Carbocisteine probably is a better choice. guaifenesin was just better known and over the counter.
i read a few things that say guaifenesin may not be actually mucolytic, but somehow reduces surface tension and adhesiveness of the mucous.