Halloween is a lot tamer than it was when people dressed up to scare away ghosts, but the idea is the same: disguising yourself lets you get away with things that you can't do in your Levis and American Apparel hoody. The boys in Lord of the Flies aren't dressing up as sexy Freddy Krueger, but they're still disguising themselves. They begin painting their faces with clay so the pigs won't see them, but the paint quickly becomes a way for them to feel better about their atrocious acts. With the paint on, they no longer have names or identities of their own; they're nameless creatures that kill and murder without consequence. Without a "self" to control, there's no need to control themselves.
Without the masks that Jack and his hunters painted on their faces, Jack would have never attained his position of power on the island.
Ralph combats his fear by dehumanizing the boys in his mind.