The graphic expression pins and needles for the tingling sensation experienced in recovering from numbness was transferred to a feeling of marked mental uneasiness about 1800. ( source ) Outside of that brief explanation the origin of the phrase is not clear.