Interestingly, I observed the same when I was practicing the drums. I would fail multiple times to reproduce a drumming part, sleep on it, and succeed on the first try the day after.
yep, same with guitar. go to sleep fumbling through a riff even though you "know" it, wake up playing it smooth as hell
Difficult parts on videogames as well. It could be attributed to slow response times due to being tired or accidentally memorizing a bad pattern, resting also could help with those.