Paroxysmal nocturnal dyspnea and orthopnea have similar causes. One of the causes of orthopnea is pulmonary congestion (excessive or abnormal accumulation of blood in the lungs) when a patient lies down and blood moves from the lower part of the body to the lungs. In normal individuals this has little effect, but in heart failure patients, the diseased left side of the heart can't pump out the additional volume. So blood backs up in the vessels of the lungs, causing shortness of breath.
Also, lung circulation in patients with congestive heart failure may already be overloaded. This condition may be worsened by fluid overload, excess fluid that accumulates in the lower part of the body during the day and moves into the lungs when the patient lies down. Lung congestion decreases when the patient raises his upper body.
In paroxysmal nocturnal dyspnea, increasing amounts of fluid enter the lungs during sleep and fill the small, air-filled sacs in the lungs where oxygen is absorbed from the atmosphere. The failing left side of the heart is suddenly unable to match the output of a more normally functioning right side, resulting in congestion in the lungs, coughing and wheezing, and sometimes the production of sputum (mucus and other matter, which may be bloody). We don't know why paroxysmal nocturnal dyspnea occurs so suddenly in patients with left heart failure.