Why when I snored yellow phlegm comes up when I wake up

There could be several reasons for this, including a respiratory infection such as bronchitis or pneumonia, allergies, or sinusitis. Snoring can also lead to a build-up of mucus in the throat and chest, which can be expelled upon waking up. It is important to consult with a healthcare provider to determine the underlying cause and appropriate treatment.