E. Cobham Brewer 18101897. Dictionary of Phrase and Fable. 1898.
John-a-Nokes [or Noakes (1 syl.)].
John-a-Nokes was driving a cart toward Croydon, and by the way fell asleepe therein. Meane time a good fellow came by and stole away his two horses. [John] awakening and missing them, said, Either I am John-a-Nokes or I am not John-a-Nokes. If I am John-a-Nokes, then I have lost two horses; and if I am not John-a-Nokes, then I have found a cart.Copley: Wits, Fits, and Fancies (1614).