This sentence is correct. 'Themselves' is the correct reflexive pronoun for the plural subject 'they'.
Corrected sentence: I hope they didn't hurt themselves when they fell off the wall.