When this happens to me, it is usually because Windows installed updates and is doing a restart. The system automatically shuts down all the programs and for a brief second you see the aw snap and Windows shuts down. Usually there is a dialog box in the bottom right corner of your screen that sporadically asks whether you want to restart, postpone 10 minutes or postpone 4 hours. I always select four hours and then lose track so it seems to be happening randomly but it was really by my selection.