My Polo will randomly, every once and then (once every month), temporarily act as if its battery was dead. It will then randomly come back as if nothing was wrong. I don't know what triggers it but is as if it locked down. I don't know if it's a fuse or what, but it's pretty random. Sometimes it lasts for half an hour, sometimes for 1 minute. Getting into the car, the electronic panel near the velocimeter won't even light up. It's not the battery or it wouldnt even recover.
If you have checked the battery terminals and supply cables then what it could be is a failing internal link in the battery.
A loose or broken internal link can do exactly what you describe and time or a jolt or vibration can cause it to dis- or re-connect at will.
Best test is borrow a battery if you can or fit a new one.