Physical pain is to be expected when you work on a laptop. I use my PC for long hours without any kind of discomfort, but working on the MacBook for even a few hours tires me out. Here is what I suggest:
1. Try using a desktop computer, if you can.
2. If you can't use a desktop, get a separate monitor, keyboard and mouse for your laptop. Use this setup when you're coding at home.
3. Learn and use Emacs or Vim. They're seriously better on the wrists. If you cannot invest time in one of these editors, learn whatever editor you're using right now properly. Make use of keyboard shortcuts whenever possible, and avoid the mouse/trackpad like the plague.
4. Use a dark color scheme in your editor and make it fullscreen. You won't believe how much cognitive strain it eliminates until you've tried it.
5. If you're using Windows, use the Windows Classic theme. On Linux, try using whatever monochrome theme you can find. The Mac already has a monochrome theme. Staring at wild colors and funky visual effects makes you feel tired. Eliminate these distractions.
Just this much for now :)