The effect of generation and stabilization of gaseous products in the periodic structure of irradiated hydrogen-containing energy-storing substances NH4NO3 and NH4ClO4 is reported. The investigated products of gamma-radiolysis create mechanical strains in the lattice and lead to solid-phase deflagration after rapid heating. The prediction of possible DD-reaction in deuterium-containing solids ND4NO3 and ND4ClO4 is made.