Primary Causes: Ventilation and Insulation
Inadequate attic ventilation is a common culprit. Proper vents at the soffits and ridge allow cold, dry outside air to flow through, carrying moisture out before it condenses. If these vents are blocked by insulation, debris, or are simply insufficient, moist air gets trapped. The still, damp air then deposits its moisture onto the coldest available surfaces, which are the rafters.
Insufficient or degraded attic insulation also contributes significantly. If insulation levels are low or have settled, heat from your home easily escapes into the attic. This warms the attic air just enough to hold more moisture, but the rafters remain cold from contact with the roof deck. This temperature difference creates the perfect conditions for condensation and subsequent freezing on the wood members.