I remember being like that when I was learning, I literally couldn't get problems out of my head, my brain would be trying to solve a code issue while I'm trying to sleep.
Now I do it everyday it's learnt to just switch off when I'm done for the day (most of the time).
Yes! It's called Jevons paradox