Press sleep button -> automatically switches off

so if press the sleep button it switches off and takes ages to switch back on also i have to press both the home and sleep button together for a while before it decides to switch on again.

any suggestions?
A software restore but sounds like it can be hardware. If its the iPhone 2G, it just ay be getting old

Original thread: https://forums.imore.com/threads/press-sleep-button-automatically-switches-off.218676/