You most likely were lying on your elbows, leading to temporary entrapment of your ulnar nerves (the so-called funny bone). Was the pinky side of your ring finger also involved? It might have been but you didn’t notice. This is a common problem that occurs to people at night (see the picture of the man with the bent arm in the link). You can also scroll down to the treatment section to see if you want to try it out. I bet that this doesn’t recur (or at least, it happens infrequently). But, if the numbness hasn’t improved, or you have it frequently or have associated weakness in your arms and hands,or any other associated neurologic symptoms, then see your doctor for an evaluation.