This is usually due to compression of the median and/or the ulnar nerves.
When we sleep, we tend to bring our hands up under or around our chins. Some people also support their heads or chins with their hands. This position flexes up the elbow (can compress the ulnar nerve) and bend down the wrist (compresses the median nerve). If the head is supported by the hand, that can compress the median and ulnar nerves.
If the symptoms go away promptly after waking up (within a minute or so), then it is due to positioning while asleep.
If the symptoms linger, or come on at other times during the day, then you may have the beginnings of carpal tunnel syndrome (median nerve) or cubital tunnel syndrome (ulnar nerve).
The first thing that is usually tried for this is to wear light splints at bedtime, to keep the wrists straight. The splints do not do anything else, so they do not need to be big and heavy, just something light, to keep the wrists from being flexed down.
However, if the symptoms are lasting for a while after you wake up, you may want to see a hand surgeon for an evaluation.