Similar issue
I've noticed since I've been on 3.1 (including Betas), that my phone does the same thing.
What typically happens this the following:
Battery over 3/4 charged
I'll use an app/ (Slacker, X-maps, or a few others)
Close out of the App
My phone starts to get really hot. I'll put it down.
I'll go to use it a little while later and it will not respond. (still very hot to the touch)
Then after about 3 to 4 hours of not touching it and it's finally cool, I'll try plugging it and it will show the battery drained.
Took it to the Apple Store. They told me it's probably an app that is corrupted. I could either A) Restore and setup as 'New' or B Purchase a replacement for $199. (Since I've had mine from launch of 3G)
They claimed that when apps get corrupted it will hang and continue to run in the background and while trying to use other applications, which will start to over tax the phone causing it to heat up and then to shut down.
I've have discovered anytime that my phone starts to get hot, shut it down, power it back up and it's fine. (because it's still doing it)