It takes a few frames for the camera to switch off. Even flat on your back it would be a one in a million chance that your camera ended up being perfectly still with the front axis aligned with the gravity vector for any prolonged period of time. You are breathing and shifting slightly even when relaxed.
A cleaner implementation would simply be monitoring the contact between the clip and the case. A shirt would toggle this to false, in your pocket would be true.