Have a look underneath your mirror, close to where the mirror's flip tab is to look for a screw. If you find this screw, tighten it up to tighten the ball joint and make your mirror stay in place. Some cars have a ball joint connection inside the roof that you'll need to access to tighten it.