DO NOT do a master reset on your phone unless your carrier specifically tells you to...you run the risk of creating more problems than you fix.
If you've had you phone less than 30 days return it to the deal and get it swapped out.
Most devices with full
QWERTY keypads experience these reboot 'problems'. Its actually a safety measure built into the software so that if an error is produced the software shuts down rather than attempting to continue and risk corrupting data.
If you were doing a lot of texting then the software probably hung and produced an error. If it continues to happen then do what I stated above.