A bedroom is a living area that serves a variety of dignified functions. It therefore requires a mezuzah even though people sometimes expose themselves while getting dressed in the room or a young child’s dirty diapers are changed there.[1]
However, the mezuzah should be encased in an opaque cover in a room where adults or children might expose themselves.[2] This would apply even if the mezuzah is on the outside of the door, as sometimes the door is inadvertently left open.[3] A mezuzah inside a room occupied by a married couple requires two covers, one of which must be opaque.[4] However, if a closed door intervenes between the room and the mezuzah, a single cover is sufficient.
An opaque cover is also advisable in a room where soiled diapers are changed.[5]
A garbage pail, changing table, or even a mop and bucket should not be placed within four amot of the mezuzah, even if it has an opaque covering.[6]
This cover may be transparent, unless there is a chance that people will expose themselves when the door is partially open.[7]
If one affixes a mezuzah on the doorway of a large closet inside the master bedroom, it should be placed on the closet side of the door, and the door should be closed during relations.[8] It is advisable to cover it anyways with a double cover, in case the door is inadvertently left open.[9]
To make a double covering, wrap the mezuzah in a small piece of paper and place it in an opaque cover, before affixing to the post.[10] The plastic wrapping that is often found on a mezuzah at the time of purchase is there to protect it from moisture, and is not considered a covering.[11]
[1] Rema Y.D. 286:2 and Bei’ur HaGra 286:4.
[2] Aruch HaShulchan  Y.D. 286:10; Mishnah Berurah 84:7; Darchei Moshe Y.D. 286:2.
[3] Sha’arei HaMezuzah 18:9.
[4] Magen Avraham 40:2.
[5] Birchei Yosef 286:4; Kuntres HaMezuzah 286:107,110; Agur B’ohalecha 32:59; Sha’arei HaMezuzah 18:8.
[6] Pitchei Teshuvah 286:7.
[7] Aruch HaShulchan  Y.D. 286:10; Mishnah Berurah 84:7; Darchei Moshe Y.D. 286:2.
[8] Shach Y.D. 286:10.
[9] Sha’arei HaMezuzah 18:9.
[10] Mishnah Berurah 40:7, citing Chochmas Adam; Chovas HaDar 1:7:32. Agur B’ohalecha (32:72:187) writes that this is the custom. Cf. Mezuzot Beitecha, Sha’ar HaTziun 286:57, citing Chazon Ish. Only one of the coverings needs to be opaque.
[11] Shulchan Aruch O.C. 40:2.