If your job is very 'real world engineering'y, work on projects that tickle theoretical itch. Try to implement a y combinator in a language you like without looking it up. Or learn physics and do simulations to help you.
The real question is why should you keep your programming motivation up if its not something you're enjoying? Find something you enjoy and do that! Programming is a means to an end. If you want to enjoy the means more, find a more inspiring end!
It's a bull market right now, you can try working in a very different kind of programming.