M5Stack Core2 - How can I use Gyro and Accelerometer sensors?

There seems to be a plethora of ways to use the M5Stack Core2 with Home Assistant: openHASP, Esphome and Homepoint for example. Those seem to focus mostly on the screen and buttons though.
But how do I use the built-in 3-axis gyro and accelerometer sensor? Has anybody experimented with that or even implemented it?

We are also interested in this feature to track our position during practicing meditation in Home Assistant.