Coughing up phlegm is a sign that your body is fighting off infection, or trying clear lung congestion. Mucus in the chest can cause unpleasant symptoms like wheezing, sleep difficulties, and a sore throat.