Chosen Solution

My phone has had no exposure to water nor has it been dropped. I cant understand why it is constantly doing it every few mins.

It can be fixed by replacing powerbutton flex. The button is working automatically without pushing it.