If you, like me, run a bluetooth keyboard and mouse on your Mountain Lion machine, you might have noticed recent occasional slow-downs in the response time from those devices.
A bit of googling told me that was not an uncommon problem and that apparently it happens mostly after resuming the OS after sleep. Also the solution appears to be restarting the BT radio.
So until apple addresses this, I’ve written myself a little utility apple script for turning the radio off and back on again. It’s based on blueutil which is available with source if you worry about malware and simply turns off the radio for five seconds before turning it back on.
I hope you find it useful.