Attic mold, explained
Why Mold Shows Up on the Underside of Your Roof Deck
Plenty of homeowners never knew they had attic mold until an inspector or roofer climbed the ladder and found the deck boards stained black between the rafters. The colder north-facing slope tends to be the worst of it, because that side gets the least sun and stays damp the longest. Through the cold months, humid air from the living space drifts up, meets the chilled underside of the deck and turns to water or frost, and that frost on the roofing nails eventually melts onto the insulation and drywall.
The moisture almost always comes from a short list. Fan ducts that end in the insulation instead of at an exterior cap, soffit vents choked off by blown-in insulation, a ridge vent that's undersized or was never installed, and air leaks at top plates, can lights, plumbing stacks and the hatch all feed warm, wet air where it can't escape. Ice dams and leaks at flashing or roof penetrations add liquid water on top of that.
That's why cleaning the wood is only half of a real Attic Mold Removal job. Unless the venting and bypasses get fixed, the deck will be stained again in a few seasons, no matter how carefully it was cleaned and coated.