With this menu bar app the Bluetooth connection is switched off when your Mac sleeps, and switched on when your Mac wakes. Visit