i just had this problem and figured it out,
my wireless mouse suddenly stopped moving on my imac so i changed the batteries but it still didnt move or click and the green light was flashing twice repeatly for a short time,
so i pressed shift-command-Q to quit apps and log out then pressed the power button and switched it off at the powerpoint, then switched everything back on and viola! it reconnected the mouse
unnfortunaetly if this happens when you have unsaved work in the background you would loose it, you can go to prefferences-mouse connection with a plugin mouse to try to reconnect your wireless one.