When my MacBook Pro (late-2013, Mavericks) wakes up, it restarts all apps after a few seconds. After a wake up, firstly I see all apps running normal then all apps begin restarting. I think I accidentally changed a preference but I can't find it.
I presume you're talking about Resume, a feature that will cause apps that were left open when you logged out to open again when you login.
From your explanation, I presume you see a window of an app, but then it will fade out and appear to 'restart' — in actuality the app hasn't loaded once yet, and is loading, not restarting.
You can stop Resume by unchecking the Reopen windows when logging back in option in a log out or shutdown dialog.
At last I've found the solution.
When I was watching a movie I saw that message "Are you sure you want to quit all applications and log out now?" It was all about a "Security and Privacy" preference that quits all application and logout. I found the solution on Apple Support Communities. Here is the solution:
Open the "System Preferences". In the "Security and Privacy" preference pane click the "Advanced..." button and uncheck "Logout after XX minutes of inactivity".
This might be due to a bug in OS X Mavericks with no permanent solution so far. A temporary solution might be given here (at least worked for me);https://discussions.apple.com/message/23638089#23638089#23638089