You sure can! If you are stacking your appliances and leaving adequate room for ventilation, a closet is a great place to house your appliances. It gets them out the way and leaves more room in your home for other types of furniture.