Moldy hair can result from wet hair pressing against your pillow as you sleep. Confining natural or curly wet hair in a scarf or bonnet overnight can also lock in its moisture and make it susceptible to mold growth.