let me get this strait. your computer is in sleep mode and you press the power button to bring it back up and it shuts off seconds later?
Or after YOU wake up from sleeping and power your PC on it shuts right off?
If its the first option, dont you just have to move your mouse, or hit a key on the keyboard to bring it out of sleep? This is just a stab in the dark, but in that case maybe its shutting off because you pressed the power button?
When my PC goes into sleep mode, I just tap a key on the keyboard and it will come out of it.