First, the energy expectation value of the superposition state you have written down is
$$ \left(\frac{n_1 + n_2}{2} + \frac{1}{2}\right)\hbar\omega $$
and one might naively conclude that therefore the energy of the state lies in between the energy of its constituents.
This naive concept doesn't work, though - the "energy" of a state that is not an energy eigenstate is not well-defined, just as the spin of a state that is not a spin eigenstate is not well-defined - all you have is the expectation value, which tells you what you would get averaging over many measurements. The spin superposition $|{\uparrow}\rangle + |{\downarrow}\rangle$ hasn't got a definite spin, and it is certainly not zero, although its expectation value is.
Therefore, the question "Where does the energy come from/go?" is simply ill-posed. A state that is not an eigenstate has no well-defined property "energy".
You might ask how conservation of energy is realised here, and the answer is simple and unsatisfactory at first: Classical conservation laws are realized on the quantum level as operator laws, or, in this case, as the conservation of energy expectation value
$$ \frac{\mathrm{d}}{\mathrm{d}t}\langle \psi \vert H |{\psi}\rangle = 0$$
in the course of the usual time evolution, which, by Ehrenfest's theorem, is always true for time-independent Hamiltonians. Thus, energy is indeed conserved.
The measurement process itself constitutes an interaction with the state $\psi$, and is in particular not a unitary (time) evolution on the system of the state. There is hence no reason to demand that the energy expectation of a state after measurement be the same as before.