Pins and needles is a type of ‘paraesthesia’ -a word which comes from the Latin for ‘abnormal sensation’. It tends to happen when the blood supply to a nerve is temporarily reduced, like when you sit with your legs crossed for too long, or when a nerve is squashed. Nerve cells are constantly pinging signals around the body, and each time they pass a signal on they need to reset before the next one comes.
When nerve cells are starved of blood they cannot reset properly, so they just fire when they can, sending irregular messages onwards towards the brain. The disruption also affects the nerve cells waiting for their signals further down the line, which can start to fire off without warning. The reason it feels like pins and needles is that the first nerve fibres to stop working are the smallest ones – the ones responsible for pain.