Had this happen to me a couple of months back, hasn't happened since.
Mine was caused by getting the car ready to be cleaned. Had the mirrors folded in but wanted them to be in the open position. Started engine and pressed the button - thought nothing of it, they opened up. But when washing car noticed the drivers mirror was slightly lose. Turned out I had turned the engine off whilst the mirror was still opening out and so hadn't fully engaged/locked in the open position, hence loose (and gears not fully engaged, like Takamo says). Hasn't done it since.