Locked out of my Mac?
You can reconnect your Bluetooth keyboard/mouse by cold starting/rebooting your Mac with the physical power button.


Make sure you keyboard is turned on
Disconnect all physical devices from the Mac, including any peripherals (printers, scanners, USB flash, etc)
Reboot the Mac (or boot the Mac if it was shut down) using the physical hardware button located on the machine 


This will trigger the Bluetooth setup wizard and detect the Bluetooth devices and enable the service automatically.

Taken from OSXDaily.com - How to Enable Bluetooth Without a Keyboard or Mouse on Mac