Based on a sample of $1.31 times 10^9$ $J/psi$ events collected with the BESIII detector at the BEPCII collider, Dalitz plot analyses of selected 79,625 $etarightarrowpi^{+}pi^{-}pi^0$ events, 33,908 $etarightarrowpi^0pi^0pi^0$ events and 1,888 $eta^{prime}rightarrowpi^0pi^0pi^0$ events are performed. The measured matrix elements of $etarightarrowpi^+pi^-pi^0$ are in reasonable agreement with previous measurements. The Dalitz plot slope parameters of $etarightarrowpi^0pi^0pi^0$ and $eta^{prime}rightarrowpi^0pi^0pi^0$ are determined to be $-0.055 pm 0.014 pm 0.004$ and $-0.640 pm 0.046 pm 0.047$, respectively, where the first uncertainties are statistical and the second systematic. Both values are consistent with previous measurements, while the precision of the latter one is improved by a factor of three. Final state interactions are found to have an important role in those decays.