According to the documentation, Physics.sleepThreshold is “The mass-normalized energy threshold, below which objects start going to sleep.”. However, from my tests, this is not precisely the criteria that Unity uses to determine when to sleep a Rigidbody.
To test this, I wrote a script the briefly applies a constant torque about the y-axis to a sphere under conditions of no gravity. I had another script on this sphere keep track of a queue of Rigidbody properties for the past several FixedUpdate ticks. This script would also check each FixedUpdate if the sphere Rigidbody was sleeping. On the frame that it went to sleep, it would log the history of Rigidbody stats so I could see the kinetic energy of the Rigidbody the frame before it went to sleep and compare this to Physics.sleepThreshold.
Kinetic energy is the sum of translation kinetic energy and rotational kinetic energy, which is 0.5 * mass * speed^2 + 0.5 * momentOfInertia * angularVelocity^2. When Unity says “mass-normalized”, I am assuming they either mean to divide the kinetic energy by mass or to divide the translational term by mass and the rotational term by momentOfInertia. I tried observing both values on the frame the Rigidbody went to sleep, but both were about significantly lower than Physics.sleepThreshold and it seems like the Rigidbody should have gone to sleep much earlier.
Can a Unity dev or someone with Unity source code access please illuminate exactly how the Physics.sleepThreshold is used to determine when to put Rigidbodies to sleep?