To restore from a back up made through iTunes, follow these instructions.
To restore from a back up made through iCloud, try the following:
The difficulty in restoring iCloud data from a back up is that the back up is older than the current version on iCloud and anything that is restored gets removed again when an iCloud sync occurs.
1. Ensure the device is connected to your local network.
2. Start the restore from iCloud back up.
3. Allow the devices settings to restore (watch for the confirmation of completion).
4. As the apps begin to restore pull the connection to your router WAN port (the one that goes to the telephone point).
5. Wait for the time out confirmation.
6. Navigate to settings > iCloud and turn off contact syncing (keep contacts when prompted).
7. Reconnect the router to the internet and let the restore process complete.
8. Delete any iCloud contacts from iCloud.com on a computer.
9. Navigate to settings > iCloud and turn on contact syncing (merge contacts when prompted).
May I suggest that you carry out a back up to iTunes before you try anything, that way should things become even worse, you can at least restore iPhone contacts back to where you are now.