Hmm. Not sure of a "knocking noise," but if it sounds like a rattle, it is probably what we call rainout. This is condensation in your hose or mask, and can/should be eliminated by a variety of methods. Try lowering or even turning your humidity setting to zero if you use a heated humidifier. And depending upon what mask you use and how the hose is routed, you can either keep the hose under the covers or use a hose cover (made of fleece or old socks or sleeves from old flannel shirts, etc) to prevent cooler night air from hitting the warmer air you're breathing through the hose--which is what causes the condensation. Some people use hose hangers above the headboard or side of the bed. There are hundreds of posts on this subject that you can find by typing "rainout" into the Search box at the top left of this page.