Consider a complete change of career, if that is at all an option. I know that sounds pretty dramatic and drastic, but you've already changed jobs several times within the profession and that does not seem to solve anything.
Apparently your inspiration is at a very low tide and you don't seem to derive much enjoyment from your work.
This is not something you are going to 'fix' (unless you're just looking at the short term) through technical measures or tricks, your body is giving you a pretty strong signal and you really have to take it serious.
In the long term your inspiration and energy will return but you need to conserve what energy you have left to maintain your health and your relationships with other people, not to pour it in to some chunk of code unless that would give you the energy to do more.
It's very tricky to give you any solid advice without knowing you much better, please be careful.
I do not second the ADD responses in this thread, they do not mesh with your analysis of yourself in some particular respects, the thing that jumps out most at me is this: "every time I sit down to code my brain turns to mush" and the second is this "One possibility is that I'm not as good as I think I am", that means that even though you may not be 'burned out' you are definitely in the risk group for burning out.
Consider a complete change of career, if that is at all an option.
While this may be a huge change to think about, don't underestimate it as a real viable option.
I actually was having the same problem as OP and have been in the process of switching careers to screen printing of all things. I've noticed myself having more energy both in and outside of work and a feeling of accomplishment that I'm actually getting shit done in a measurable way. When I actually do sit down to write some code in my off-time, I've felt much more inspired and have actually had the drive to finish the things I start.
Obviously this is all heavily YMMV, but certainly something to consider.
I too do not think you have ADD or depression or any of those things. You are just not really meant for this career. I am in the same boat. It's a bit of a tough pill to take, as this is an exciting space to be in, but if your body and brain are trying to override your will at every step, you're not in the right occupation.
I don't want to get into specific advice, as I don't know you, but don't forget that there are many types of programming. If you are doing web stuff and are super bored, maybe you really should be programming robots or video games. Personally, this didn't work for me. I do like the thought processes in software, and I like typing in code, but I greatly dislike sitting in front of a computer for longer than about 2 hours.
Someone on HN mentioned a couple of self-help books by Barbara Sher. I've found them very useful, they are not flaky or very "self-helpy" just more practical advice about career changing and trying to figure out what I'd rather be doing.
Apparently your inspiration is at a very low tide and you don't seem to derive much enjoyment from your work.
This is not something you are going to 'fix' (unless you're just looking at the short term) through technical measures or tricks, your body is giving you a pretty strong signal and you really have to take it serious.
In the long term your inspiration and energy will return but you need to conserve what energy you have left to maintain your health and your relationships with other people, not to pour it in to some chunk of code unless that would give you the energy to do more.
It's very tricky to give you any solid advice without knowing you much better, please be careful.
I do not second the ADD responses in this thread, they do not mesh with your analysis of yourself in some particular respects, the thing that jumps out most at me is this: "every time I sit down to code my brain turns to mush" and the second is this "One possibility is that I'm not as good as I think I am", that means that even though you may not be 'burned out' you are definitely in the risk group for burning out.