Have you added any new hardware? It could be the psu (Power suply Unit) is failing.
I had a phaze of this happening when I added a new dvd drive. I just bought a higher wattage psu. Seems to be working fine now.
Galaxy Note 8 vs iPhone X
The secrets of creating gory VFX
How to update iOS on iPhone or iPad
WhatsApp : comment lire vos messages sans que l’expéditeur le sache