The rate at which energy is absorbed or released by inductor can be determined from the ordinary power formula.
Here V is the voltage drop across the inductor.
The energy stored U can be found by integration when the current increases from zero to some value I.
For a DC RL circuit, the expression U = 1/2 L I2 gives be energy stored in the inductor after the circuit is switched on and reaches its steady state value of the current I. If the current is varying with time I(t), then U is still the energy stored in the inductor's Magnetic field at that moment.