If this happens when powered from battery only – it might be an intermittent connection at the battery terminals, resulting in a complete loss of power.
To improve laptop battery connections - remove the battery, slightly moisten your index finger (with water) and gently rub the battery contacts until dry (and then some). If it is evident that a battery contact has been compressed (due to continual contact) – you could gently uncompress the contact (using whatever tool), taking care not to short out the battery contacts in the process.