It wouldn't explain why you can't turn it back on but there is a setting that determines whether or not your phone ever turns off or auto-locks automatically. Go to Settings, General, auto-lock. You can pick 1,2,3,4,5 minutes or never as your setting for whether or not your phone will turn off or sleep automatically.
I don't mean to be elementary but since you asked about "settings" I wanted to make sure you were aware of that one.