Hi there,
This my story about the 3GS. I bought a 3GS in november 2009. Unlocked by factory.(spend almost 600euro for it)
This summer 2011 I replaced the battery because I experienced a quicker drain. (it was not a real problem but I just wanted my phone to be perfect.) When i bought it, it ran on 3.2.1, and during time I updated every single new ios version on it,I jailbroke it, reinstall it, and even downgraded it, no problems at all. I was very satified with this phone, always worked like a charm. Even when I updated to ios5.0.1 (i think it was novemer or december last year when i did this) I never experienced any problem. After using it for 2 years, i thought it was time to upgrade to the 4S, so I did. I cleaned up the 3GS,en reintalled the firmware as it was a brand new phone, and sold it to a colleage. Since then this phone is having the randomly rebooting problem! The only thing different comparing the situation before selling it, is the simcard! My colleage reinstalled it with itunes on his computer,with a different (new) account,as a new phone, and it worked good for about 2 weeks. Now he has this reboot issue, but only when the simcard in installed. I've read all the posts on this community,but no one but mohammed mentioned the simcard. I do not have a solution, but for me it is clear that the simcard is involved.