A dehumidifier might help you sleep better, but I think first it is important to figure out why you are feeling short of breath and why you are coughing while you sleep. In order to get to the bottom of this, you should go see your primary care doctor
One of the most common causes of these symptoms is nasal allergies or sinus congestion. These are commonly associated with indoor allergens like mold and mites, and so they are typically worse at night (mites live in the mattress). Dehumidifiers work by helping to reduce the number of allergen particles in the air. However, it is usually necessary to treat these kinds of allergies with medications, and this is something your doctor can discuss with you.
is another condition which often is worse at night; if you have a history of asthma, these episodes of coughing might be a sign that you need to get your asthma under better control.
Bad acid reflux
is another cause of coughing and shortness of breath at night, and your doctor can also help you with this.
Finally, rarely, shortness of breath at night can be a sign of a more serious problem, such as a heart problem, and it will be important to have your doctor rule this out.