yEd only ever modifies files when you explicitly save or export your diagram (yEd does not have an auto-save feature). Thus putting your computer to sleep does not cause yEd to corrupt files - at worst, you might lose unsaved work.
Unfortunately, there is no guaranteed way to recover corrupted files. (This is actually true for all files, not only graph files.) If the graph file was only slightly damaged, you can try to open it in a text editor and manually fix its GraphML/XML structure. Otherwise, the only option is to restore the file from a backup - if you have a backup, that is.