According to Wikipedia, "In folklore, fairy-locks (or elflocks) are the result of fairies tangling and knotting the hairs of sleeping children as they [the fairies] play in and out of their hair at night.""