Thanks to all.
I was able to solve this puzzle:)
When we shutdown the Mac, the mouse and the keyboard go to sleep mode(this is instructed by the mac to the mouse/keyboard controllers) to conserve battery. I usually switch them off at this moment.
For the mouse and the keyboard to work with the mac there is a bluetooth setup done by the mac. Likewise, the mouse and the keyboard will have some controller working in sync with the mac. As I had this habit of turning the devices off, right when their controllers were instructing them to sleep, some configuration in the magic mouse could have gone wrong making it stay in sleep mode even when you switch ON and go out of sync with the mac.
So, what I did this time when it turned ON somehow is shutdown the mac, leaving the devices to sleep as designed and turned ON the mac back again.
The mouse and keyboard powered back with green lights. Later, while the mac was running, I tried all combinations of turning the mouse ON and OFF through batteries and the button, but the mouse responded well.
I now understand that to avoid this rare problem, which could happen at some point when you turn off the mouse while it goes to sleep through an instruction from mac which is shutting down, is to wait. Wait till the mouse sleeps completely, i.e, the green light goes off plus 2-5 seconds more for its controller to sleep and then turn the slide button off. Same with the keyboard.