Your slowdown is way higher than anything I've seen to date. That could be a multitude of things on top of each other.
One thing You touched lately was that Your workload is on the edge of RAM - that's something to be keep in mind as windows start to shuffle info from RAM to SSD once You get close to the edge. In some cases even mouse cursor start to lag - if that happens during Your workload, that's another additive that deepens Your issue.
as for sleeping in general, I would advise to disable any power settings, that allows computer to focus on power saving so it would always be in a right gear so to speak. Some of use even tweak CPU/mobo settings, that CPU would run at constant speed instead of dropping up and down.. but that's another topic.
las but not least, to understand when the issue happens You should be running some sort of monitoring app in the background like MSI afterburner. You can have this logging in visual form what was CPU doing, what GPU, what are the temps, load, fill state.. - sounds obvious, but it's rather powerful as it gives hints to what You machine is doing.