iTunes is a white app with a multicolored musical note on it.

If you're prompted to click Download iTunes, do so before continuing. You'll need to restart your computer during this process.;
, To do this, plug the USB end of your iPhone or iPad charger into your computer, then plug the charger end of the cable into your iPhone or iPad., This is the iPhone-shaped icon in the top-left side of the iTunes window. Clicking it will take you to the "Summary" page., It's on the right side of the "Backups" section near the top of the page.

If prompted, turn off "Find My iPhone" before continuing.
You may want to create a new backup first, since restoring an old backup will erase any data from between that backup and now. To create a new backup, click Back Up Now.
 A drop-down menu will appear., Make sure you pick a date at which the iMessages you deleted were still on the iPhone or iPad., Your iPhone or iPad will begin restoring. This process' length will vary depending on your iOS device's amount of data.

If your selected backup is password-protected, first enter the password.
You may need to update your iPhone's software before iTunes will restore your iPhone.
 Once the restore is complete, you should be able to view your deleted iMessages in the Messages app.
Open iTunes.
Attach your iPhone or iPad to your computer.
Click the "Device" icon.
Click Restore Backup.
Click the box next to "iPhone/iPad Name" when prompted.
Click a backup date.
Click Restore.
Wait for your restore to finish.
{"src": "wikihow-all_validation", "title": "How to Recover Deleted iMessages from an iPhone or iPad1"}