If seperated by a door, no: The closet is not considered sleeping quarters.