When the organism is resting and energy is not immediately needed, the reverse reaction takes place and the phosphate group is reattached to the molecule using energy obtained from food or sunlight.