There can be various causes for a sour taste in mouth.
1... Uncontrolled diabetes
can result in flourishing of bacteria at the back of tongue during sleep in night resulting in sour taste of mouth.
2... Gastroesophageal reflux diseas ( GERD ) can result in sour taste.
3... Sinus infection
may result in post nasal drip
4... Smoking or bad oral hygiene
5... Infected tooth or gum diseases.
6.. Deficiency of VIT B12 or ZINC.
you should consult a diabetologist
and subject your self to thorough investigations.
Once the cause is found,it would be easy to treat you.
I hope it helps