I'm not certain what causes it for you, but for me it was microsoft's antimalware scans. These are supposed to run only in 'idle' mode but for whatever reason were running while I was using my computer.
What's worse is the automatic OS restarts that seem to also think I'm in idle mode.
I ended up turning off all that crap eventually. I cant remember what exactly I did but it was quite an adventure that involved registry edits and stopping services. Certainly not something that is made easy.
The setting I'm talking about is in Update Settings -> Change Active Hours. From your previous post, it sounds like you haven't disabled automatic updates, so changing when they update so it doesn't happen while you're working might be a good option, and it has nothing to do with the registry.
What's worse is the automatic OS restarts that seem to also think I'm in idle mode.