Did you ever apply a restore set that did not match the firmware version?
Also - there is a handy thing build into Android (and any other Linux based system): LOGFILES!
You can use ADB or the logcat app or even the preinstalled testmode app to watch the system log for errors.
Here is an explanation on how to enter test mode on unrooted readers:
https://wiki.mobileread.com/wiki/PRST...ering_Testmode
Within test mode, there is a log dump feature which dumps the system log to sdcard.
Regarding sleep mode - there is no swapping between RAM and flash. RAM is powered all the time and only the cpu will go to a low power state during sleep.
I definitely to not believe that other partitions than system or data have been corrupted. The only thing I can imagine is that the kernel image does not match the system partition because you flashed a restore set that did not match the firmware version....