Eu não consegui encontrar nenhuma seção no NEC que proibisse que os switches fossem instalados em closets, então até alguém poder apontar para uma seção específica, eu diria que não é um problema. Pode haver adaptações para o código em sua área local, então você terá que verificar com o inspetor elétrico local para ter certeza absoluta.
A NEC, no entanto, tem uma seção sobre luminárias em armários de roupas.
NEC 2011
410.16 Luminaires in Clothes Closets.
(A) Luminaire Types Permitted. Listed luminaires of the following types shall be permitted to be installed in a closet:
(1) A surface-mounted or recessed incandescent luminaire with a completely enclosed lamp
(2) A surface-mounted or recessed fluorescent luminaire
(3) Surface-mounted fluorescent or LED luminaires identified as suitable for installation within the storage area
(B) Luminaire Types Not Permitted. Incandescent luminaires with open or partially enclosed lamps and pendant luminaires or lampholders shall not be permitted.
(C) Location. The minimum clearance between luminaires installed in clothes closets and the nearest point of a storage space shall be as follows:
(1) 300 mm (12 in.) for surface-mounted incandescent or LED luminaires with a completely enclosed light source installed on the wall above the door or on the ceiling
(2) 150 mm (6 in.) for surface-mounted fluorescent luminaires installed on the wall above the door or on the ceiling
(3) 150 mm (6 in.) for recessed incandescent or LED luminaires with a completely enclosed light source installed in the wall or the ceiling
(4) 150 mm (6 in.) for recessed fluorescent luminaires installed in the wall or the ceiling
(5) Surface-mounted fluorescent or LED luminaires shall be permitted to be installed within the storage space where identified for this use.