Welcome to Apple discussions.
Try a couple of things (in sequence).
Trash a preference file and restart (com.apple.bluetooth.plist).
Reset PRAM and SMC (instructions in knowledge base articles).
Delete the keyboard (in system preferences>bluetooth) and then restart. The setup assistant should begin the pairing process.
I'm witnessing a similar loss of Bluetooth and I've tried all of the things that you (and many others) have mentioned. However, the next time I shut my Mac pro (5,1) down, the new settings are lost. The first reboot doesn't find the Magic Mouse, but Bluetooth is still there. A second reboot and Bluetooth is now missing totally. The only fix I've found is to reset the SMC at every boot. That's a bit much, isn't it?
Just hoping that you might have a bit of insight that I've missed... Next stop Apple Support Call so I can repeat all of this to them 3 times.
For the benefit of anybody searching for a solution. I lost Bluetooth completely from the system after waking the iMac from sleep. Resetting NVRAM seems to have fixed the problem (I used the wired keyboard from one of the other macs in the studio). It was slightly surprising that the iMac opened the Disc Utilities window on start-up, but I just closed it & hit Restart.