For anyone struggling to picture what might be going wrong on these occasions take a look at the images in section 6 and 7 of the description here: http://www.bikeradar.com/gear/article/workshop-how-to-overhaul-your-freehub-23757/
When you freewheel or turn the pedals backwards the little metal catches (pawls) slip to allow the wheel and cogs to be independent from one another. When you pedal they engage to ensure that the cogs and wheel are directly connected.
Sorry - not my best ever explanation... google 'bicycle hub pawl' for images etc.
Imagine something which stops the little metal catches (pawls) engaging. That might be water which got in to the system (which is ice after a cold night). It might also be thicker grease (and maybe some added grime) - particularly if it's cold.
When I had this happen many years ago it was because I'd tried to add grease into this system - I was told that this was a mistake and that I should have used something thinner. To be honest I don't know what the exact right lubricant is... BUT if you're on the point of having to replace the whole thing anyway (so you have nothing to lose) I'd suggest trying to add a thinner lubricant of some kind - hoping to thin out whatever thicker gunk is holding the pawls in their disengaged position.
But please take my comments as just a personal opinion not particularly well informed advice - all I know is what I learned on that one occasion very many years ago.