QM: where did that energy come from?

This question is likely a stupid question, or based on some trivial misconception, but I can't find where the error is.

Imagine a hydrogen atom.
An electron is sitting nicely in its orbital. I measure its quantum numbers to know in wich orbital it is. It will remain there for now, since the orbitals are eigenfunctions of the hamiltonian.

Now I decide to measure the position of the electron. So, I use the position operator (x,y,z). The eigenfunctions of this operator are Dirac functions (they are, aren't they?). So, the wavefunction now "collapses" into a dirac function. This dirac function can be expanded as a linear combination of the orbital functions (since these are orthonormal and complete).

So, when I measure the quantum numbers of the electron once again, I will have a nonzero chance of finding the electron in any of the orbitals wich made a nonzero contribution to the expantion of the dirac function. Therefore, I might find the electron in an orbital with more or less energy than the one in wich it was originally.

Where did that energy come from? Or, alternatively, where did it go to? Did I add or remove energy to/from the electron by trying to measure its position? Or is there some foolish error in the above reasoning?

This question is likely a stupid question, or based on some trivial misconception, but I can't find where the error is.

Imagine a hydrogen atom.
An electron is sitting nicely in its orbital. I measure its quantum numbers to know in wich orbital it is. It will remain there for now, since the orbitals are eigenfunctions of the hamiltonian.

Now I decide to measure the position of the electron. So, I use the position operator (x,y,z). The eigenfunctions of this operator are Dirac functions (they are, aren't they?). So, the wavefunction now "collapses" into a dirac function. This dirac function can be expanded as a linear combination of the orbital functions (since these are orthonormal and complete).

So, when I measure the quantum numbers of the electron once again, I will have a nonzero chance of finding the electron in any of the orbitals wich made a nonzero contribution to the expantion of the dirac function. Therefore, I might find the electron in an orbital with more or less energy than the one in wich it was originally.

Where did that energy come from? Or, alternatively, where did it go to? Did I add or remove energy to/from the electron by trying to measure its position? Or is there some foolish error in the above reasoning?

If that atom were the only thing in the universe it could stay happily in its energy state, but you had to go and mess around with it, so it obviously is not the only thing in the universe. Somewhere in the course of your interaction with it, that atom absorbed or emitted a photon. Exactly how it does that involves more than just knowing about its electronic state wave functions.

Imagine a hydrogen atom.
An electron is sitting nicely in its orbital. I measure its quantum numbers to know in wich orbital it is. It will remain there for now, since the orbitals are eigenfunctions of the hamiltonian.

As I understand this situation

Measurement is an interaction with the wave function of the electron - proton combination that selects an eigenvalue of the measured quantum number (i.e. orbit number).

When you measure the orbital quantum number a photon interacts with the electron.
Therefore it will not remain there for now.

I took Quantum Mechanics in 1975 and do not work in the field.
But it seems to me that your idea of measurement is somewhat classical not Quantum Mechanical in this case and my be the cause of you concern.

The wave function contains all the information about a system.

But access to that information (selecting an eigenvalue of a quantum number) is probabilistic and disturbs its dual quantum number.
The dual quantum number is via the Hiedenberg Uncertainty Relation (measure one and the other is “spread”) momentum - position, time - energy etc.).