Yosemite magic Mouse and a bluetooth disconnection party
Update!  - Delete "Bluetooth PAN" from network settings and wifi and bluetooth will  instantly work better.  Credit: http://ihealthgeek.com/2015/02/yosemite-10-10-2-wifi-and-bluetooth-finally-solved-no-really/


Otherwise, you can try my previous approach that works better, but is still a nuisance.




Turn off bluetooth on macbook
turn off keyboard/mouse
turn on bluetooth on macbook
Hold power-on key on keyboard WHILE
Choose the Bluetooth>Device>Connect from the macbook
Connection should succeed immediately
Release power button on device


This has worked for me repeatedly after trying the PRAM and other no-fix fixes.   It's a pain to do, but works everytime for me, and stays connected until I leave the room.