Bluetooth ache
If your Mac stops recognising a Bluetooth device, Ctrl-click the device in System Preferences > Bluetooth and try disconnecting and reconnecting it, or removing and pairing it with your Mac again. If that fails – or Bluetooth totally stops working – restart your Mac. Finally, hold Shift+Opt and click the Bluetooth icon in the menu bar (which you can make visible in the Bluetooth preferences pane). You’ll see a Debug submenu, which includes an option to reset the Bluetooth module. This temporarily disconnects your mouse and keyboard. If they’re wireless, wait for the process to finish and they should reconnect relatively soon after.