I too struggled with this disconnecting problem for many weeks trying every solution I could find including upgrading to "El Capitan". I gave up in the end and reverted to using my "Targus Bluetooth Laser mouse" Then an idea came to me.
Previously when using the Targus mouse all other bluetooth mice (I also have a "Mighty Mouse") have been turned off. So I thought why not try the Targus and Magic mouse at the same time. Here is the sequence.
Turn OFF Magic Mouse
Turn on and connect Targus mouse
Turn ON Magic Mouse
Leave Targus on while testing the Magic for maybe a few hours (whatever you feel happy with)
When satisfied all is well turn the Targus OFF.
For me now all is perfect with the Magic so after a few more hours I decided to RESTART my Mac, (Leave Magic turned on and other mice off)
Magic started straight away on restart and has stayed working perfectly for 5 days now. I did intend to test this routine with the Mighty Mouse but as all is happy I did not want to push my luck but I feel that if you have or have access to any other bluetooth mouse then this should work.
I really hope this works for you...