When you let your computer get that low on battery, you should really plug it in/turn it off (or both! Both is good) rather than leaving it asleep all night. This business of it periodically deciding that it doesn't want to have the keyboard work is annoying.