I've endured years of wrist pain from working at my computer. Switching hands just made the other wrist hurt. I bought ergonomic mice and keyboards, but nothing seemed to stop the dull ache in my wrists. I got a lot of bad advice from doctors and physical therapists before I found routines that worked for me. Here's what I learned.
What Doesn't Work
Painkillers - Don't take painkillers just to continue working. The pain is telling you to change the way you use your body. Drowning out that signal with painkillers might help for a few hours, but it can't be a permanent solution. Painkillers might be helpful if pain is keeping you from sleeping, but even then, consider using a cream like Icy Hot or Bengay.
Splints - Don't use splints just to continue working. Putting my wrists in splints felt better at first. I didn't notice the pain as often when my wrists were immobilized. But it came back if I tried to work with splints on.
Steroid Injections or Surgery - Your doctor may recommend steroid injections or carpal tunnel surgery. That may be good advice for you, but do some research before taking this drastic step. There are lots of people who had steroid injections or surgery, only to have the same pain return a few years or months later.
In short, if you're still using your body in the same way, none of these "treatments" will eliminate your pain.
What's Causing the Pain
There is a bundle of blood vessels and nerves that connects the spinal column to each of your hands. The bundle emerges from the lower neck and passes under the collarbone to the armpit. (To learn more, search brachial plexus and thoracic outlet syndrome.) If, like me, you compute with your body hunched forward to reach the keyboard or to see the screen better, then those nerves and blood vessels will be compressed while you work. Depending on your posture, you may experience numbness in your hand due to a compressed nerve. Or compressed blood vessels may prevent your arm muscles from working properly. Tightened muscle fibers in your arms can exert a constant pull on your wrist, causing a dull pain.
In short, what you feel in your wrists is caused by how you're positioning your neck and shoulders when you work.
It's not easy to change the way you use your body. Years of hunching forward tightens the muscles and fascia in the front of your neck and chest, and it stretches and weakens the muscles in your upper back. To get better, you're going to need to work on all these areas. Harder still, you must become aware of how you're positioning and using your body. You'll need to recognize which muscles you're using, so that you can take breaks as soon as you notice yourself falling back into old habits.
What Works For Me
Massage - This is not the relaxing kind of massage. Instead, I'm talking about targeting specific muscles. There are no muscles in your wrists, so massaging your wrists won't help. Your fingers are pulled on by long tendons that pass through your wrist and connect to the muscles in your forearm that control them. To loosen these muscles, massage your forearm just below your elbow. Use slow movements with strong pressure. This is easiest to do by pressing and sliding your arm firmly and slowly over a ball, letting the ball roll along a wall or tabletop. Lacrosse balls work best, but tennis balls are fine, too. Massaging your forearm often brings relief, but only temporarily. That's because other tight muscles higher up are pulling on the muscles in your forearm. For sustained relief, you'll need to work on muscles in your neck, chest, and upper back. I've spent a lot of time working on my scalene muscles. There are three of these on each side of the neck. They can be massaged by holding one hand pressed into the side of the neck and moving it slowly with appropriate pressure from the other hand. I've also found it helps to work on the muscles under my shoulder blades, by bringing my arm across my chest and pressing my back into a ball on a wall. I even think it's been helpful to work on muscles in my lower back (with ball against the wall), as these seem to help improve my posture and prevent me from leaning forward at the shoulder and neck. I have a theory that massage can help your body find the places that need repair, but you need to get enough restorative sleep for it to heal. I've found massage most helpful for relieving pain in the short term, but other measures are required to prevent it from coming back.
Traction - It's not just muscles that can become too tight. It's also fascia--the stuff that covers your muscles like plastic wrap. To work on tightened muscles and fascia, I tried many stretches without success before discovering traction. With traction, you let friction pull just slightly on some part of your body over several minutes. I lie down with a foam roller under the length of my spine. I place my head so that my neck is stretched just a little taller than usual, and I spread my arms out wider than usual with my hands resting on the floor. After 10 minutes, I get up and feel much better. It works even better when combined with meditation, which I'll get to shortly.
Strengthening - You've probably relied too much on some muscles and ignored others. You'll need to strengthen the right muscles in order to put them to work again. If you've been working in a compressed position, you've probably stretched and ignored your upper back muscles. Regular exercise of this area can go a long way. I've found that I benefit from exercises that squeeze my shoulder blades together. I've also recently discovered that strengthening my core by doing lower back exercises seems to improve my posture (and body awareness) in a way that's perhaps been the most effective way to prevent the pain from returning.
Meditation - This has been the most important piece for me, with pain reduction being just one of many benefits. I practice mindfulness meditation, where you bring your attention to your breath, returning to it whenever you notice your mind wandering. It's best to set aside at least 10 minutes a day for this. Stress can drive you to work in awkward positions without breaks, and meditation can reduce that stress. My favorite kind of meditation is called a body scan, in which you bring your attention to one body part at a time, focusing especially on those areas where you experience tightness or pain. Observe these sensations with curiosity, accepting them without judgment. Sometimes, just by bringing your attention to a part of your body, you'll sense the muscles there relaxing, but you shouldn't strive to make this happen. To start, you might try listening to body scan recordings on YouTube. Over time, you'll become more aware of how you're using your body when you're at your computer. You'll discover which positions cause unnecessary strain. You'll learn to sit or stand with better posture in ways that don't strain those tight muscles. Personally, I've noticed through meditation that I tend to breathe too much from my abdomen. I find a lot of relief if I imagine the air in my chest sliding upward and into my shoulders (which seems to encourage my scalene muscles to lift my collarbone). I have also discovered that the seat of my consciousness seems to live in my jaw or neck region. If I pay more attention to sensations around my eyes, sometimes my neck loosens up and I breathe easier.
Best of luck!