I'd bet that it did its thing while you were sleeping, or glancing the other way, or something. CO2 released on shaking is residual carbon dioxide in suspension, which you usually get post-fermentation (although I suppose in very early stages of fermentation it could occur similarly). Either...