Does the Oberth effect only apply when in orbit of a planet or would a rocket generate more and more thrust (if kept on) even in deep space? Wikipedia explains that the faster the rocket goes, the more useful energy it generates. But since speed depends from what point of reference you are measuring it, how can that be possible since the fuel doesn't know the rocket's speed?
The Oberth effect takes advantage of when you add something to a quantity that is squared then the effect will be larger, the larger the quantity is initially. It works when a body is under the gravitational influence of another, usually larger e.g. a spacecraft around the Earth.
In the central body approximation, the energy equation of a (keplerian) orbit around a central body is, at a certain instant
where $v_0$ is the velocity, $r_0$ the distance to the central body and $\mu$ the gravitational constant (gravitational constant times the mass of the central body). The energy will remain constant while there is no maneuvers.
A sufficiently fast maneuver can be considered as an instantaneous change in velocity $\Delta v$, while $r_0$ remains approximately the same (around the Earth maneuvers usually take only a few minutes, which is much shorter than the orbital period around 100 minutes in low Earth orbit). So the energy after the maneuver is
Now the larger the initial $v_0$, the larger the change in energy $E-E_0$.
Instantaneous maneuvers are an approximation. You can think that if the change in energy is different with the same maneuver (by making the maneuver at a different distance $r_0$) then something is wrong. Actually when performing the maneuver some propellant is expelled (and the mass of the spacecraft changes) and if one accounts for the energy of all, spacecraft and propellant, the change in energy is the same.
It can also work the other way round with a $\Delta v$ opposite to the initial $v_0$ (braking) and loosing more energy the larger the initial $v_0$.