Modern night lights won't have this happen, as they have a built-in "buffer" to prevent rapid on/off cycles like that.
But I do remember having an old night light when I was younger, probably from the late 80s, that you could make flicker by putting your hand in front of the bulb so that the light reflects back onto the sensor, effectively turning it into a very fast Useless Machine.