I don't know if being glutened has caused you to cough and splutter or not.Coughing and bring up sputum is not normal. It indicates an assault on your airways and the over- production of sputum means your lungs may become infected and in the end run damage your lungs. Get checked out.
I have only recently found out I am a possible celiac disease. I have had lung disease ALL my life. My primary diagnosis is bronchiectasis with a chronic pseudomonas infection. I only have about 45% of my lung capacity left . It was thought to be the result of a genetic condition called PCD. This is where the hairlike structues on your mucus membrame don't work correctly and sweep the mucus out. People have problems wherever thay have mucus membrane, sinus and lungs are common. Men are generally infertile and women subfertile.
If consuming gluten causes inflamation in your body I expect that sometimes this may involve your airways where they will secrete mucus to protect themselves.
It will be interesting as I start gluten-free to see if my underlying condition improves.