If you have headphones with an Infrared sensor (IR), the lens in front of the infrared sensor for the on-head-detection may be covered. Please check and – if necessary – clean it with a dry cloth.
If you have older headphones with a capacitive sensor, the headphones take a moment to calibrate when they are powered on. Pausing for a moment before stretching the headband to put them on will let them finish calibrating.
Other factors include placement on the head, or head coverings that stretch the headband. Try different positions and slider placements. Proper positioning can be found in your product manual.