Just wanting to pass along this idea that’s working for me. I installed a bulb on a bedside lamp with a motion sensor to turn it on. I had the sensor sitting on a dresser, and it would sense almost all motion in the room. However, the light was turning on and off all night because I’m not a still sleeper.
Moving the sensor closer to the ground, on a table leg about 12 inches from the floor solved it! It still turns on the light when anyone enters the room, but ignores my nocturnal acrobatics.