The itch begins with a nighttime migration

Pinworms live in the intestine, but the adult female leaves it to deposit eggs on the skin around the anus, usually while a person is asleep. The movement and the eggs’ sticky coating irritate sensitive skin, producing the characteristic itch. Because the worms are active at night, the discomfort can be especially noticeable in bed and may interrupt sleep.

How scratching carries the cycle forward

Scratching can pick up microscopic eggs on fingers and beneath fingernails. From there, they may reach the mouth directly, or transfer to objects such as pajamas, bedding, towels, and bathroom surfaces. A person can swallow the eggs without realizing it; they hatch in the digestive tract, and the worms mature there. Later, females migrate back to the skin to lay more eggs.

That creates a feedback loop: nighttime irritation prompts scratching, and scratching can move eggs to places from which they are swallowed. Eggs can also pass between people through shared surfaces or hands, which helps explain why pinworms can circulate among household members. The itch is therefore more than a local nuisance—it is the point where the parasite’s life cycle meets everyday habits.