Data + Process = Results
Data is your current job.
Process is what you do with that data.
Most people will want to change the Data; that is, change job, change career, take vacation, etc.
Sounds like you're asking how to change Results without changing the Data, right?
Simple. Keep the Data the same but change the only other available variable: the Process...
Keep going to work. Keep doing the job. But change how you think about it: "How can I use this current situation as an investment toward my future?"
Consider multiple solutions to every work assignment, their way and a better way. You can still implement their way while learning a better way you can implement on the side or later.
Consider every assignment an "instance". Come up with a "class" of solutions for that instance. Instead of writing one solution, write a "mini-framework" that would solve this problem AND many similar problems. Again, you don't have to implement your elegant solution now, but once it's in your brain, it's yours forever.
Find time to talk to your users! Find out what they hate that's not being addressed (and there's probably plenty). Then work on that stuff on the side. Do it at work now and become a hero or don't do it at work now and become your own hero at another time or place.
Always be thinking, "How can I use this project to better myself?" Get creative. You may surprise yourself with the possibilities.
Most programmers struggle finding ideas. You have the opposite problem. You're surrounded by problems desperately needing solutions but not getting them. They're just not on your radar because you're so unhappy being unmotivated in your environment. Focus on the unassigned possibilities while you're in the muck. You may not realize it now, but where you're already at is the best place to find them.