1. Open up the Messages app and view a recent text message from someone you know is saved in your contacts.
2. Scroll up to the very top and you will Contact > at the top right.
3. When you click that you should see the info for that person. Add Something to the contact like a fake phone number. (You can delete this latter on.)
4. Press the back button and go back to the messages app and magically all you contacts will be restored.
If you can’t see your contacts in the messages app then you will need to restore from a backup in iTunes.