Meanwhile, my parents have a lamp that turns on when you touch the top of it. Their cat not only figured out how it works, but he also figured out that three touches sets it to maximum brightness, while the fourth touch turns it off. So, whenever he ate all his food at night, he would go into the room and tap it three times.
When that stopped working (they started unplugging it before going to sleep), he learned how to turn off their CPAP machines and started doing that on purpose to wake them up. And then he taught the other cat how to do it.
My parents now no longer allow either cat to come into the bedroom when they're sleeping.