This paper constructs a simulation model of indoor sound field based on ODEON software, and proposes an iterative updating strategy for the distribution of sound-absorbing materials in combination with the topology optimization algorithm. Combined with 2D boundary element model and finite element analysis, the validity of sound field simulation and optimization effect of sound-absorbing materials are verified. Through the 2D boundary element model and the sound barrier optimization case, it is verified that the reverberation time of each room is adjusted under the effect of room coupling, and the difference between the reverberation time of the master bedroom and the living room under the same frequency is not more than 0.05 s. The optimized material has a surface density of 0.39 kg/m², which has the largest sound absorption coefficient, and it has a very good acoustic absorption effect for the mid-frequency band as well. In order to achieve the same acoustic effect, glass fiber acoustic cotton needs to be 80mm thick. The results highlight the importance of optimizing the design of the ratio of sound-absorbing materials.