Have you ever been diagnosed with any kind of lung condition, like COPD, emphsema, bronchitis? It's very typical to have more secretions at night for a couple of reasons. For one, you're lying down, which means a larger surface area of your lungs is being compressed than when you're upright. For another, you breathe not as deeply when you're resting, so the secretions aren't moving around as much and tend to collect.
Drinking lots of fluids will help keep the mucous thinner so it's easier to get out. If you smoke, that will also make it worse. The little hairlike thingys in your airway that move foreign substances, like dust and secretions, toward your throat so you can cough them out become paralyzed for about 20 minutes after smoking, so more mucous will build up.
If you haven't seen a doctor, that would be a good thing do to, since this has been going on for 7 months. I hope you can get some help and relief.