To improve the yield of online prompt gamma neutron activation analysis, the Monte Carlo N-Particle Transport Code (MCNP) is used to simulate the computation and analysis of the material and thickness of reflectors on both sides of the sample chamber as well as the type and thickness of the neutron-absorbing material in front of the detector. The simulation shows that the optimal thickness of the reflecting material is [approximately]100 mm when heavy water is added on both sides of the sample chamber and the optimal thickness of the neutron-absorbing material is [approximately]50 mm when polyethylene-containing boron is added in front of the detector. The experiment demonstrated that the yield of prompt gamma rays of the main elements in the cement sample increased to some extent.