The files can be restored, but they'll just be deleted again if you restore them to the same place they came from.
A better solution is to export or save your iCloud files to a different place on your hard drive (for example, Documents) before you sign out.
Okay….just to be sure I do this right….this is what I understand.
1. iCloud needs to be fooled into thinking that my Calendar and Messages files are somewhere other than normal.
2. I'll make new Time Machine and Super Duper backups.
3. I'll turn off my Time Machine and Super Duper drives to make sure iCloud doesn't 'search and remove' on them.
4. Then I'll go to my Users>Library>Calendars folder and move it to Documents.
5. Ditto for the Users>Library>Messages folder.
6. Then I'll sign out of iCloud.
7. iCloud will delete the Calendar and Messages folders from Documents.
8. I'll restore the Calendars and Messages folders to Users>Library.
I assume that moving the folders from either the Time Machine or Super Duper drives is as easy as Click and Drag.