If you have ever backed up your iPhone to iCloud or iTunes you should be able to restore your iPhone text messages from the backup. In fact unless you disabled the automatic sync option in iTunes, you should have created a backup everytime you synched with your PC or Mac.
Unfortunately, iCloud doesn't back up SMS in all territories, and for all phone operators. My UK O2-operated iPhone 5 falls into this category. So the following may not work (which is a shame because this is the best backup you can have for your SMS messages). You'll need only to go to step 2 to find out.
2. Click on Text Messages (if it isn't there your messages haven't been backed up).
3. If it is there searched the messages to find the ones you need.
4. Now go to your iPhone and choose Settings, iCloud on your iPhone.
5. Turn off Text Messages (or ensure it is turned off). I know this sounds counter intuitive but stay with it.
6. You'll see a pop-up. Select: 'Keep on My iPhone'.
7. Now turn back on text messages.
8. Tap 'Merge', and wait. After a few minutes the deleted text messages should appear back on your iPhone.
Restore deleted texts on iPhone: from iTunes backup
1. Connect your iPhone to the PC with which you sync it. iTunes should open (if not, open it manually).
2. You should see your iPhone in a box, top righthand corner. Select it.
3. Now choose 'Restore backup'.
4. All the data you previously backed up will now replace the data on your phone. It will take a few minutes. As long as you haven't backed up subsequent to deleting those text messages, they should now appear on your phone handset.