I'm coding from my bed over my laptop, and after about an hour of coding my fingers start to hurt. I am learning touch typing but it will still take a while. During this time what can I do to reduce the pain/improve the comfort of typing?
Is this question a joke? Hurting fingers is pretty hardcore. Well I have an answer anyway!
a) you will develop callouses (although I've never heard of this with keyboards, only guitars --play till you bleed! haha)
b) you are typing too hard.
c) your keyboard is rubbish (could cause )
So give it a rest and see what happens. Or buy a new keyboard.
Put a chair and desk on your bed.
Actually I often compute on my bed but I put my laptop on a pillow on my lap so it's higher up. It helps to keep my back straighter and my wrists don't bend as much. I'm not sure I understand how your fingers are hurting though.
Most likely, your keyboard is at a bad angle for you to be typing. An adjustable laptop stand will relieve undue strain on the fingers, hands, and wrists.
You are kidding, coding in bed is likely to cause some of the worst keyboarding postures possible, at least try kneeling over the laptop with your knees on the floor and the laptop on the bed if you must do this in the bedroom.
FFS, get a proper environment to work in.
Sit at a desk or table. Coding while sitting on your bed just isn't comfortable. At a minimum look into a lapdesk or something similar.