I've been managing carpal tunnel for about 5 years. Like others, I would recommend you avoid surgery if possible. I've known several people who have gotten the surgery. Only one has had completely positive results. The others all complained about permanent loss of strength -- one very extreme, the others less so. The pain went away for all of them, but I didn't want to sacrifice my strength and potentially my playing ability, personally.
My feeling is that if you pay constant attention to how your wrists are positioned and how they feel, then you will be able to adapt your behavior. I don't just mean when playing guitar, I mean all the time. For example, I remember seeing an interview with an old professional violin player once. In the middle of the interview the camera briefly focused on one of his hands because he was holding it perfectly straight, suspending in the air just an inch above the arm of the chair. In other words, he had trained himself to constantly keep his wrist straight and never put pressure on the bottom (the palm side), even to rest it.
The rubber band exercises on this page really helped me :
http://www.wellness.ma/health-condition ... ndrome.htm
The logic behind the rubber band exercise is that as you develop strength in the flexor muscles of your forearms (which control your fingers), they become bigger and push the bundle of nerves leading into your hand (your carpel tunnel) into a position that puts excess pressure on it. The solution in this case is to develop the opposing muscles of your forearms, your extensors. The rubber band exercise does this. Reverse curls using free weights do not really help, though, because when you do them you'll notice that you also use your flexor muscles to hold the weight.
You could also view this as an excellent opportunity to review and improve your playing style. Adapting your playing to reduce strain and minimize the amount of strength required can only be a good thing.
Also, I found that my sleeping positions were aggravating my condition. I had a tendency to rest my head on my wrist, or to tuck one of my hands underneath my chest. Putting pressure on your wrists is a no-no, so this was obviously something I had to remedy.
I hope you're laying off the guitar and/or keyboard completely for at least
a few weeks. Doing just about anything will aggravate the pain when the insides of your wrists are still swollen.
Anyway, regardless of what you end up doing, good luck.