Set flag on awaking from accelerometer sleep

…instead of setting it on going to sleep, in which case it is often not
logged.