What an intermittent frozen pipe is telling you
A pipe that freezes some days and not others isn't random. It's sitting right at the edge of freezing, and something small is pushing it over on the bad days.
That something is usually one of a short list: wind, an open door or vent, a thermostat setback, or a fixture nobody's used in a while.
The good news is that intermittent freezes point you to a specific spot. The pipe isn't uniformly cold. There's one weak few inches where insulation, air sealing, or heat is missing.
Fix that spot and the freezing stops. You don't need to insulate the whole house or re-plumb anything most of the time.
This is one of the more DIY-friendly plumbing problems, assuming you can reach the pipe. Materials run under $125. The hard part is the detective work, not the repair.
Why it's happening
Start with the variable that changes. If the freeze happened on a windy night, wind is forcing cold air through a gap somewhere along the run.
If it froze after a quiet weekend or a vacation, you're probably dealing with a dead-leg (a rarely used line) where still water freezes faster than moving water.
If it happens on the coldest nights only, your thermostat setback is likely bottoming out a room that's already colder than the thermostat reads.
And if it correlates with someone leaving the garage door up or the crawlspace vents open, that's your answer right there.
Underneath all of these is the same physics. One short section of pipe is losing heat faster than the water can replace it. Air movement across bare pipe steals heat far faster than still cold air, which is why a wind gap can freeze a pipe that survives calm nights at the same temperature.
That's the whole reason air sealing matters as much as insulation. Foam alone won't stop a draft that's blowing straight across the pipe.