If you sync your data to iCloud, it keeps temporary backups without you telling it to. Here's how to retrieve those backups.
When you store data from your iPhone or iPad in iCloud using iCloud sync, iCloud automatically keeps temporary backups of the data for each app you sync.
If you delete the data from your iOS device you can still recover it later. To do so, log in to iCloud.com on a Mac or PC, and click the Account Settings link.
Next, under Advanced, click any one of the Restore links. This brings up a window where you can select any Files, Contacts, Bookmarks, or Calendars to restore. Each restore point is listed by backup date by default.
The list also shows you how many days until each backup will be deleted from iCloud. You can also sort the list by name or folder using the popup menu in the upper right corner.
When you click Restore it will overwrite your existing iOS device data with the backup. Your current data on your iOS device will be overwritten. It may take quite a while to restore the data to your iOS device - even hours.
When complete, your iOS device will now have the version of the backed up data on it you selected in the Restore window on iCloud.com. The process is fairly simple and easy to use, even if the restore does take some time.
The iCloud user Guide has a section on restoring from iCloud. In the case of Files, the guide says "Look for your recovered files in the folders they were in when you deleted them. For example, if a file was in the Pages folder when you deleted it, look for the recovered file in the Pages folder".