Here's John McCain talking to Katie Couric and explaining -- but with his facts all wrong -- why the Anbar Awakening counts as a consequence of the surge:
Colonel McFarland was contacted by one of the major Sunni sheiks. Because of the surge we were able to go out and protect that sheik and others. And it began the Anbar awakening. I mean, that's just a matter of history. Thanks to General Petraeus, our leadership, and the sacrifice of brave young Americans. I mean, to deny that their sacrifice didn't make possible the success of the surge in Iraq, I think, does a great disservice to young men and women who are serving and have sacrificed.
Spencer Ackerman asks the press corps to recognize that "this is completely fucking wrong" and points to then-Colonel, now-General Sean MacFarland explaining the origins of the awakening to UPI's Pam Hess on September 29, 2006. That was a bit over a month before the midterm elections. The surge wasn't announced until after the elections and wasn't actually implemented until long after MacFarland gave the interview. And presumably the events he was describing happened before the interview itself.
This specific timing issue aside, we can see here the larger point that McCain doesn't actually seem to know what the surge was. But the surge troops were overwhelmingly sent to increase the level of manpower in Baghdad (i.e., not where the Anbar Awakening happened) and almost certainly (along with a tactical shift to more of a population protection mission) deserves credit for reducing the bloodshed in Baghdad by stabilizing the borders between now-segregated neighborhoods. I'm not sure I would go so far as to say that it had nothing to do what happened in Anbar, but it wasn't a major factor, and certainly didn't make anything happen in September 2006. I note that this isn't the first time the right has had occasion to appeal to Michael Dummett's theory of backward causation in their discussion of Iraq.