Cameron has done one of two things.
Either been very very lucky to come out the winner, or his team of Whitehall officials and civil servants have looked and played the political sphere perfectly.
Day One after vote:
1: Addressed the public at 7am and took back the initiative from Salmond and the SNP.
2: Stopped the SNP in there tracks from saying everything is the fault of Westminster, Now with more powers and a "No" vote you just need to shut up and get on with it, potentially reducing there power in Scotland.
3: By seeming to offer more than should be offered to Scotland without anything for the UK, he built up a negative policy amongst the British public for Scotland which he could counter within days.
4: Understood that the growing resentment for Devo-Max (see point 3) among the rest of the UK, would allow him to play his trump card and sideline the 40-ish Labour MP's in Scotland out of all future UK parliament policy, and Labour will be on the wrong side of the argument with the public if they protest too strongly. So with the above timeline he will be able to reduce the power of Labour for years.
5: Seized some of the UK/British UKIP support for great powers for British people.
6: May come out as a stronger leader and head off a leadership bid in the political short term (5 years) from Boris.
Personally i thought the no campaign and Cameron looked very weak and ran to offer too much when a poll said they might lose, however it could have been a very clever political game and if that is the case, I think the Tories may have won. We may not know for years but it would be interesting to find out if it was headless chickens time, or a brilliant piece of realpolitik...