While it is not clinically proven, tight muscles such as those of your thighs, hamstrings, neck, shoulders, etc., after long desk work may cause a sensation of sourness on your tongue, especially when waking from sleep. It sounds crazy but it could be associated with the facial nerve, one of the cranial nerves that conveys sensory input from the tongue.
Muscle tightness often affects the functions of the adjacent nerves. When the neurotransmission is disturbed by muscle stiffness the sensory input could be different from what is supposed to be.
In this case, stiffness of the muscles of the legs, lumbar or shoulders may affect the neck muscles and then press the facial nerves. These pressed facial nerves transmit the taste of sourness to your brain as if it were being sensed on your tongue. This is the hypothetical scenario behind this phenomenon. However, it has been empirically observed that relieving the tightness of the muscles stops the sour sensation.
In other words, when you wake up in the morning and have sourness on your tongue, it could be an indication that you have severe stiffness in some muscles that are affecting your neck.