Probably works like the soldering station here or something. I often forget to turn it off, but it detects "stability" and turns itself off after half an hour or so.

Or maybe they have a capacitance sensing wire woven in, and if it doesn't change (nobody moving about in bed) then it figures nobody is in bed.

Cheers