You need to cough. Thats how you clear your lungs.
You may have pneumonia:see a dr, get antibiotics. Have a lovedone beat on your back (ok, not hard, but hard enough-flat palm to the area where the lungs are located in the upper back-like you are playing a bongo drum). This helps break up the congestion in your lungs, you cough it out. This is a trick used in hospitals to ease patient's suffering.
On a side, eat regular pineapple(not canned), especially if you want to sleep. Pineapple has a natural enzyme in it that reduces coughing (urge to cough). It may help.