Were you using Google Chrome at the time? Several other users reported problems with this.
There are several other threads where users are reporting problems with new (2012) MBAs freezing when using Chrome. It is not a problem on earlier (2011) models.
I've not seen any solutions posted yet. Perhaps you should consider using Firefox until a solution is found.