It's probably over heating. Don't worry though, your psp is not getting damaged every time this happens - it turns off before any damage can occur. However, if this happens regularly, then it may be too sensitive.
Try SGT4EVA's suggestion of updating the firmware. There is a good chance updating won't change anything, but it is worth a shot. Otherwise, unless you are playing in an area that is particularly hot, you might want to look into the warranty.