And this is why you have devices like this rotating bed:
http://www.rotoprone.com/
Jesus
pneumonia is an infection, either viral, bacterial or fungal. We breathe those in all the time but our immune system fights them off. Those enemies are in water droplets in the air and will not only enter the lungs if someone is laying down, this would be impossible unless the droplets had controllable propulsion systems. If the immune system is run down because the resources are very busy dealing with something else, such as another illness or repairing the body after traumatic surgery, then the pneumonia will begin. If the pneumonia turns chronic, then powerful anti-biotics will be required, but even those don't work in all cases.
A person who lies in bed for a long period can devolop pneumonia. That's why they don't keep people lying down long in the hospital. You have got to get up and move around to prevent it. If you do have pneumonia in your lungs you will need pretty powerful antibiotics so don't hesitate to see a doctor.
Lungs will not be flooded with fluid unless you have a particular medical condition. Such as when the alveoli, where gas exchange takes place, get full of fluid. The membranes in the lungs do stay moist, this is natural. Causes for excess fluid can be such things as lung infection, artery problems, heart problems or excessively high blood pressure.