This is why I would smash my head against a wall trying to beat a boss in Dark Souls for an entire evening, then wake up the next day and beat them on my first or second attempt.
Very common phenomena that is discussed frequently in the souls community.
Sometimes called the "cold controller" effect as well, and not necessarily requiring sleep but rather just a break from the game.
That’s so on point. One time I was stuck on One Reborn from Bloodborne for a whole evening. While I was sleeping I figured out the optimal path to best the Chime Maidens. I woke up and beat the boss in 5 mins.
Very real phenomenon. Happened so many times
I experience similar, but I'm pretty sure it's just rest and a fresh mind, not overnight learning/thinking. When I'm bashing my head against a wall, I'm stuck in a local optimum, and sleeping lets me reset and try something new that often works better (and I execute it better since I'm not as tired).