Hi rockalicious,
It’s actually about both. The materials in the upper layers of your mattress are important for humidity and temperature control which is a key part of healthy and comfortable sleeping. you can read more about this in post #2 here and post #29 here.
The ventilation of the mattress as a whole though and particularly in the lower layers and where they interface with the foundation or support surface you are using is also important to reduce the risk of mold and mildew which can damage a mattress and along with dust mites which also like warm, humid environments can also have an effect on healthy sleeping. You can read more about this in post #10 here.
Most mattress encasements can breathe enough that they would not be a significant risk factor for mold, mildew, or dust mites so the biggest issue would be more about humidity and temperature control and how it affects you than about how it affects the mattress.
Phoenix