Sometimes, my Magic Mouse suddenly disconnects. It has a strong battery level, so I know it isn't that. Anyone have any ideas what might be causing this?
As stated in the other answers there are numerous reasons to this. I have experienced 2.
Problems with the bluetooth antenna/signal
One of my Mac minis would drop the magic mouse, the keyboard and bluetooth headset regularly. I solved the problem by removing the antenna and putting it back (a few tries were necessary to get a stable connection).
On My macbook it seems the magic mouse and another bluetooth mouse seem to disconnect when the mouse is held in hand (hand covering the mouse) very close to the right side of the screen. It looks like there is a dark spot on the bluetooth antenna which prevents it from picking signal from devices positioned in particular places next to the computer.
My bluetooth headset loses the connection (drops some sound) when I stand next to the computer with my head and body between the computer and the right ear cup.
So you should check if you don't have a similar dark spot next to your computer. Or if the disconnections are not happening (more often) in particular situations which could impact the signal.
Some batteries will start having problems with the contact, when oxidation occurs all you have to do is turn quickly the batteries in the mouse to remove the oxidation... If it's not enough you can try scratching the parts which are touching the mouse's contacts and the mouse's contacts with something metallic to remove any traces of oxidation.
Also tapping the mouse on the desk will increase the chances of batteries moving and shifting position just so slightly that they might be touching the connectors with a dirtier part.
Mismatched rechargeable batteries seem to create problems. Using two batteries both from the same brand but with different recharge cycles seems to trigger disconnections of my Razer mouse.
This answer also has a good explanation about how the battery level is calculated. It also states that some "cheap" batteries will discharge differently and will not be able to properly power the mouse after a short period of time:
...they can't supply the sudden bursts of power the radio in the mouse requires, so some transmissions are lost...
One other major problem you might experience is interferences. You will want to have a look at this list of sources.
The first thing to do would be to try replacing the batteries — even if they may seem full, there's still a chance they could affect performance.
If that doesn't work, take a look around your workspace for possible sources of interference, such as cordless phones or microwaves. Apple has a knowledge base article listing many possible sources, and suggestions on how to avoid problems.
Finally, if the problem is easily reproducible, perhaps you should take your computer and mouse in to the Apple Store to get their advice (and, if necessary, perhaps a replacement).
(It would also be interesting to note — if you have any other bluetooth devices, do they experience the same connection problems that your Magic Mouse does?)
Are you using rechargeable batteries or even the same brand all the time? I'm thinking there could be a battery-related problem, not necessarily bad batteries but just the interaction between the battery compartment of the Magic Mouse, which is distinctive, and the profile of the battery.
The Magic Mouse has some big cylindrical contacts at the negative end that are spring loaded and provide a good clamping force. At the other end are two recesses that house the positive terminals.
If the profile of the top of the battery is such that the button top is rounded or the sides slope down to the flat top (however slightly) rather than being perfectly parallel then perhaps the bang forces the the button against the edge of the contact surround, forcing the battery down and back, breaking the contact with the positive terminal. If you look at the positive contacts and observe any rounding to the plastic around the contacts that could be it.
The metal button on the positive end may be soldered, welded or just contact the electrode without any mechanical connection other than the sleeve of the battery and the clamping force of the contacts. If you can switch batteries and still see the connection issues with a bang on the desk then you've taken a step toward ruling out any individual set of batteries being faulty.
If it's neither of those things, head off to the Apple Genius Bar. Chances are they will just replace it.
I had this problem, and the fix for me was to move to a 5 GHz Wi-Fi network. The usual 2.4 GHz Wi-Fi networks interfere with the Bluetooth signal. I used to have disconnections of my mouse every five minutes or so, which was somewhat annoying for a new computer. But choosing the 5 GHz network on my home Wi-Fi seems to have fixed it. I have had no disconnections for over 24 hours.