I get the same pains and I've noticed they come from long sessions at the keyboard. Bad typing habits can do a lot of harm to more than your wrists - take a 5 minute rest every 30 minutes of typing and make sure you have good posture when sitting at a computer - elevate the wrists, back straight, feet flat on the floor, and avoid keeping your neck bent for long periods of time.
You should also look into getting one of those gell pads that you rest your wrists on when typing. They aren't very expensive and most elevate the wrists and makes typing a lot more comfortable.
Verbatim Gel Wrist Rest