Welcome to the forum.
Have you seen an allergist? Since this problem comes and goes, it sounds to me, an old mom and grandmom, not a doctor, that something might be triggering this that is not happening all the time.
First, I recommend seeing an allergist! You can get some quick, easy skin tests that may solve the mystery.
For food allergies and sensitivities I recommend keeping a food diary, as my allergist had me do very successfully. You can find many threads in the search box on that subject. Since this problem might be something other than food, you'll have to keep track of your activities and locations too.
Get a medium size notebook or a calendar with daily pages. Write the date, time, everything you eat or drink, medicines, and what you are doing and where. Hopefully you will figure out if you have one or more triggers or allergies and can just avoid them. The food journal worked for me and I found my sensitivity.
I get rid of mucus using a sinus wash, not just a spray. I like the large NeilMed bottles because they give a more thorough wash. Follow the directions. DON'T use tap water because it can contain brain-eating amebae. Use only distilled water or cooled boiled water.
I also take Mucinex 12-hour, which thins mucus. I can't swallow the large pills, so I recommend only the 600 mg ones. You can't chew them because they are time-release. There are cheaper, generic tablets with the same ingredient, but make sure they are time-release or they only work for a couple of hours at most.