Intermittent outlets and lights

A base station for a robot vacuum is permanently plugged into a wall socket in our living room. Every so often, the station beeps, as if the electricity just came on. I haven't paid much attention to this, but the last time the device beeped, a lamp plugged into the same socket simultaneously turned on, as well. I had been sitting in the room for a good half-hour, and the lamp was off the whole time.

All I can think of is that the lamp must not have been turned off when last used, the power went out in the circuit for quite a while, and then came back triggering lamp and vacuum. I didn't turn on or off any other switches during this time.

What would cause an intermittent circuit like this?

Also: A year ago, we had a ceiling lamp that went out; replacing the bulb did not fix the problem. I gave up and thought I'd have to look at the switch one day; it was a low priority location. After a few months, it started working again. I'm starting to freak out that there are so many intermittent circuits in the house.