Sinus Infection. (his nose mucus is yellow, not clear). If it was just per allergies, his nose mucus would be 'clear' not yellow.
Post-nasal drip... which causes coughing... as it drips down the throat. Especially when sleeping.
Coughs... arise from:
1) post-nasal drip, or
2) the chest
Your son, it seems his cough originates from his nose. Hence post-nasal drip. Do not give him 'cough medicine' for this. It will not help... because it is not his 'chest' that the cough is originating from.
If his chest is 'clear.' Then his cough is NOT from his chest. It is from his Nose/post-nasal drip.
Try a Neti-Pot to rinse his nose. To alleviate his Sinus issues.
This helps a lot.
Even my Huband's Doctor uses one.
Can be found at drugstores or Whole Foods.
My Husband uses one too. He is prone to Sinus Infections.
Sinus Infections... are hard to get rid of.
It is a prescription Allergy med. Maybe they have kids' versions.
The outdoors, probably has airborne things that irk his system. Hence, allergies/runny nose.
Instead of 'guessing' which natural things will help him. See a Naturopath or Holistic Doctor. That way, you will get help/info per HIS condition. Not hearsay.
*Did he get Antibiotics for his ear infection?
If Sinus Infection, an Antibiotic will help.
The sinus cavity... is like a dark dank 'cave.' It nurtures bacteria. And it is close to the ear canal... hence, infections. Back and forth.
Also, try getting an air filter/purifier for your home, or especially his room.
all the best,