As a 9-5 programmer, I often found myself too mentally exhausted to do any coding outside of work. This meant that over the years, programming became just a job, and nothing more.
But once I changed career tracks, I found that I had the energy to write code after work. It actually felt like taking a break. I went from "I need to get away from the computer and go talk to people" to "I need to get away from people and just write code". And when I was writing code on my own terms, without any project managers or other people telling me what to do, it became fun again.
I'm not necessarily saying you should move into management too. I'm lucky that I enjoy the people side of the job, unlike a lot of programmers. But I think that if you put yourself in the same situation as you were in when you first discovered the joy of programming, you'll be able to rediscover it.