While you sleep, the female pinworms leave the intestines through the anus and deposit eggs on nearby skin. This can cause intense anal itching. School-age children and preschoolers are most likely to get pinworms.