One Possible EXPLANATION For Apple Wireless Keyboards Or Mice GOING THROUGH BATTERIES In A Matter Of Weeks is as follows:
When you shut down or sleep your Mac, if there is a second Mac running at some distance away (up to 100 meters distance), and this distant Mac has bluetooth switched on, and was, for some reason, previously been paired with your wireless keyboard or mouse, then I believe the keyboard or mouse will try to link to the distant Mac after you have shut down the local Mac, using all its available transmission power to overcome the distance, and thereby wearing down the batteries.
This happened to me. I have two Macs in the house, and paired my new wireless keyboard with both computers, just so that I could use this keyboard with either Mac.
But when I shut down the Mac I was using, without me realizing, my wireless keyboard that I had in front of me would then link up to my other distant Mac (which was usually always running), located at the other side of my house, and in doing so, my wireless keyboard would wear out its batteries in weeks from the power drain due to long distance transmission and reception.
Whether this battery draining from long distance transmission and reception can also occur when the wireless keyboard or mouse has not been paired with the distant Mac, I am not sure. It's conceivable that in the bluetooth polling mode, where the distant computer is trying to link up to the wireless keyboard or mouse, there could also be substantial power draining from long distance transmission and reception (especially if bluetooth is set to discoverable).
Someone may want to test this: seeing if bluetooth polling over distance can drain power. Who knows, it may be that your neighbor has a Mac, and so when you switch off your computer, your wireless keyboard or mouse spends all night trying to link to your neighbor's Mac.