There are various ways to recover deleted text messages from iPhone 5
1. Using iTunes Backup
- Disable automatic syncing in iTunes
- Connect your iPhone to your computer
- Restore the iPhone from a backup.
2. Using iCloud
- Erase your iPhone.
- Select the "Restore from iCloud Backup" option.
- Allow the content to download onto your iPhone.
3. Using Third Party Software
- Download, install, and open data recovery software like Tenorshare iPhone Data Recovery