During sleep you can have shortness of breath due to emphysema. However, this is not a condition directly connected to sleeping and should show its signs throughout the day also. If you only have the symptoms during sleep then you must be in very early stages of emphysema, so do check with your doctor.
During regular breathing we breathe in oxygen through our nose, which goes down our throat (trachea) and then down smaller and smaller airway passages called bronchi (plural of bronchus). The bronchi themselves divide into tiny bronchials (tiny bronchi arteries), so the air we breathe goes all the way through each single tiny arteries and ends up in minuscule, very thin, grape like clustered sacs (called alveoli), where, finally, the oxygen that we inhaled is transferred into the blood and the carbon dioxide is extracted from the blood vessels.
Breathing in air
Illustrating bronchial and alveoli
Alveoli getting damaged
When we inhale toxic gasses from our environment we can damage the above process. An example of toxic vapour is cigarette smoke, which is commonly inhaled by a lot of smokers as well as non-smokers. Taking in these poisons can initiate the development of emphysema, which is a terrible disease, because it is irreversible and it undermines the ability of the lungs to do their job.
Alveoli are destroyed already in the early stages of emphysema. This results in holes in the tissue of the lower lungs, which cause the collapse of the bronchials which prevents any more air from reaching the healthy alveoli which still remain untouched.
Finally, the process where the oxygen is inserted into the blood and the carbon dioxide remove is compromised and an equal exchange can not take place. This causes shortness of breath and keeps of deteriorating over time inflicting harm to the lungs as well as the heart.
Thanks to user chcltd for uploading this emphysema video to YouTube, which is what I used to write this article and draw the photos.