Burnout is essentially when you put too much energy and focus into a single activity over a prolonged period of time. So to combat burnout, the solution is simply allowing yourself to experience the opposite, which is contrast.
Contrast can be defined as doing something that's the opposite of the task or lifestyle that's been leading you down the burnout road. So if you're burned out from programming, examples of contrast would be:
1. Physical exercise. This could be running, biking, lifting weights, boxing, MMA, etc.
2. Art. Examples include painting, sculpting, woodworking, and making music.
3. Cooking. Buy a book on a certain cuisine of cooking and learn to make the recipes in it.
4. Traveling. Go somewhere for the weekend that you've never been before so you can be exposed to new sights and experiences.
If you can learn to regularly inject some contrast into your life, you'll find that not only will your burnout start to fade, but solutions to problems will come to you more easily and with less effort than before. And more importantly, life will feel more enjoyable and will become less of a grind on your mental state.
I personally use activities from all of the four categories above to keep myself from going absolutely crazy and I highly recommend you do the same.