If you have a Mac in close range to Apple TV and you want to use the same bluetooth keyboard with both it can be a bit of a pain. If you have a mouse connected another way (not bluetooth) then this tip may come in handy. Make sure the keyboard is connected to the Mac then:
- Open system preferences
- Click Bluetooth
- Click Advanced
- Untick Allow Bluetooth devices to wake up this computer
- Press OK
- Close the window
Now put your Mac to sleep. Hold the power button on the keyboard for a few seconds. Press the power button again with the Apple TV. As long as you have already associated it with the Apple TV it should then connect.