Since installing Mavericks, I lose functionality of my bluetooth peripherals often too. Forutnately so far, it's only one peripheral at a time, so i can use one to fix the other by following these steps.
When my bluetooth keyboard quits working, I use the mouse/trackpad to do the following:
click (top left corner of screen) > System Preferences... > Bluetooth
When Bluetooth settings come up, mysteriously it toggles the functionality of my keyboard again!
When my bluetooth mouse/trackpad quit working, I use the keyboard to do the following:
cmd + space (to bring up spotlight, top right corner of screen) > type the word "bluetooth" > use down arrow to select "System Preferences: Bluetooth" > then hit enter
When Bluetooth settings come up, it toggles the functionality of my mouse/trackpad again.
Hope this helps.