Hello~I have this issue myself. For me, it is due to vertebrae in my neck being out and pinching nerves, my chiropractor usually helps this issue. Yes, sleeping with your hand under your head or pillow will also cause this.
Counting money and typing can also contribute to this, I would ask to be checked for carpal tunnel, it is not unusual for a typist or someone using their hands a lot, to have this issue.
Carpal Tunnel Syndrome does start manifesting as you describe. I have had this from sleeping on my arms, reducing the circulation and wake up with them numb, and have also had the symptoms appear regularly from poor ergonomics sitting at my desk. Once I make sure that my chair supported my arms so that my hands and wrists are straight as I type, the CTS symptoms disappeared. If this is new and often, check your working position and I bet the symptoms will go away in a week or two.
it is probably that your hand arm is so asleep depending on how long you were sleeping on it ..give it time it usually comes back normal