This article presents a material distribution method that is tailored to the interior design of reactive mufflers. Such devices are typically acoustically small, except in the length direction, and their interior consists of a combination of pipes, expansions, contractions, and Helmholtz resonators. In order to design the interior layout using material distribution optimization, it is necessary to be able to resolve thin sound-hard materials as well as thin sheets with a given acoustic impedance, such as perforated plates, and manage small channels to Helmholtz resonators. We develop a method that uses an anisotropic design filter in combination with a fine mesh in order to control the minimum thickness separately in different directions. A two-stage post processing procedure is used to control openings to resonators, and embedded thin impedance surfaces are modeled by a mortar-element method. Numerical results demonstrate that the approach can produce mufflers with high transmission loss for a broad range of frequencies. The optimized mufflers include components that resemble combinations of expansion chambers, cylindrical pipes, and Helmholtz resonators.