According to a patent registered by Apple in October 2021 and recently granted, the manufacturer plans to integrate a head movement detection system into future AirPods, in particular by adding sensors such as an accelerometer.
AirPods and Apple Fitness+
This feature will work with services like Apple Fitness+ to verify that the user is performing the correct movements during their workouts. Today Apple Fitness + is based on the Apple Watch and its heart rate sensor to assist you during sports sessions, but a motion detector in the AirPods can refine this monitoring. Also, the headphones will be able to send audio feedback to correct you while exercising.
Note that this patent may also apply to the spatial audio function, precisely changing the direction of the sound according to the movements of the listener's head and body.