Hydration bags usually are hanging in the back of your backpack. That is, they're the closest thing to your back so they get some radiated warmth from your body.
When you leave home, consider filling the bag with hot water instead of cold. This will buy you some time and delay the effects of freezing. Essentially, you're loading up the water with extra energy and that energy will slowly dissipate.
On a cold day, the problem will be water freezing in the tube between the bag and the mouthpiece.
Fit the tube in 0.5" flexible pipe insulation. These are foam tubes of different widths available in the hardware stores and have a slit lengthwise. This will mitigate heat loss from the water in the tube.
If the mouthpiece is frozen, hold it in your mouth until the ice melts.
Add your comments below!