This is a very common problem here on the islands. If your current is not stable this can happen quite often to laptop and batteries. I had one in that was working fine. AFter a few hours the system died. I had to pull the battery to get it to boot up again. Here I am not sure in other places this is quite common. I have a practice now with all laptop when using power to fix them with that I pull the battery before working. Normally for me I do not keep the battery on my laptop when using the power source to work with. If I need to use the laptop without the power source I charge the battery and replace it and then work with it this way.
Here I see that people buy laptop and keep them plugged into the power source all the time when using them. Then when the battery is needed on a power outage the battery does not work anylonger.
