The role of stochasticity in sawtooth oscillations