Electric unicycles use built-in gyroscopic sensors and accelerometers to detect the rider's movements and maintain balance. The onboard computer processes these signals to adjust the motor's power, keeping the unicycle upright.