Most people have experienced the temporary loss of feeling and tingling in their leg resulting from sitting in an abnormal position for a short while. Usually you get a loss of feeling in your leg while it is being compressed/constricted at some point and then the tingling sensation as the pressure is removed. But what is actually happening? I understand the the blood vessels are probably constricted from the pressure, but how does this lead to loss of feeling and later the strange tingling sensation? Are there any other things that extended compression on the leg does to cause this? What exactly are the requirements to get the sensation of a one's leg or other limb falling tingling in that manner?
The feeling you describe is called "paresthesia," and according to the NINDS info page, it happens "when sustained pressure is placed on a nerve."
Numbness is caused by cutting off circulation (that's why hand surgeons can use a tourniquet to numb your hand for a carpel tunnel release procedure). The painful tingling occurs upon RESTORATION of circulation. It's called REPERFUSION INJURY, and here's the mechanism:
4.a. hypoxia causes cell injury/stress, and reduced ATP synthesis (without O2 cannot run electron transport chain)
4.b. in the cells toxic buildup of anaerobic metabolites, adenosine, oxygen radicals, and nitrogen radicals ensues
The explanation in the link Polynomial posted is essentially correct.
Whenever there is a reduced or blocked blood supply (ischaemia) to your extremities, the 'five P's' can occur: pulselessness, pain, pallor (colour), paresthesia (numbness) and paralysis (or weakness).(1).
The numbness and weakness happen after the blood flow have been reduced for a particularly prolonged period.
Cells in our body require a blood supply to stay alive (think about a stroke or heart attack for example). So a reduced supply can cause them to function abnormally or after a time (depending on the cell or tissue type) die.
So with a 'sleeping leg', staying in an awkward or particular position where arterial blood supply is blocked or reduced to the leg, the muscle, nerve tissue etc all lack supply hence causing sensory disturbance and weakness.
The possible buildup of metabolites could also contribute to the symptoms (pain).
Hope that helps!