Sweat glands begin to develop in the fetus around the third month of gestation. Eccrine glands are fully developed by the time of birth, but their function is not fully mature. Apocrine glands, on the other hand, become functional during puberty. In newborns and infants, the sweat glands are not as active as in older children, which can impact their ability to regulate body temperature effectively.