Just happened to my 3G as well. Battery used to go all day and now it is good for just a few hours. Phone is warm to the touch both while charging and while doing nothing. Almost seems like something is running in the background eating up the charge. Are there apps out there that would help pinpoint what is running on the phone?
Try resetting your iPhone by pressing the home and sleep buttons until you see the Apple logo, ignoring the slider. Takes about 5-15 secs of button holding and you won't lose any data or settings.
This is laso happening to my 3G. I tried "System Activity Monitor" app but it just displays eMail, Safari, and what seems to be internal processes. I killed both, eMail and Safari, but the iPhone remains hot and the battery draining,
I've tried resetting the phone and it doesn't help. I have not tried restoring the phone yet, but have an appointment at the local Apple store for this Saturday.
Other threads indicate a heating problem with 3.1.3 and many users are wishing they could go back to 3.1.2. Don't upgrade your OS until you've figured out what is causing the heating.
I total deactivated an Exchange account I have. It made a great difference. It wasn't enough with disabling push methods. Maybe that's the cause of the problem.
I took mine in and their diagnostics just saw OS processes running in the background. They suggested turning off notifications to conserve battery. Since notifications weren't causing a problem before, I don't think that's the issue now. I've tried turning off wifi, bluetooth, location, and 3G and didn't see any relief. I went through the restore process and that didn't help.