For newborns did you have them wear a hat while they sleep?

Miller

I thought wearing a Hat while they sleep was bad cause that is how babies self regulate their temperature though their head but my aunt told me to put a hat on his head when he sleep cause the head part is still open, like the skull, skin over head not develop yet or something..z baby in room with ceiling fan.