  Quantum measurement back action is fundamentally unavoidable when
manipulating electron spins. Here we demonstrate that this back action can be
efficiently exploited to tune the spin relaxation of localized electrons
induced by the hyperfine interaction. In optical pump-probe experiments,
powerful probe pulses suppress the spin relaxation of electrons on Si donors in
an InGaAs epilayer due to the quantum Zeno effect. By contrast, an increase of
the probe power leads to a speed up of the spin relaxation for electrons in
InGaAs quantum dots due to the quantum anti-Zeno effect. The microscopic
description shows that the transition between the two regimes occurs when the
spin dephasing time is comparable to the probe pulse repetition period.
