The children’s game. “Here we go gathering nuts in May” is a perversion of

“Here we go gathering knots of May,” referring to the old custom of gathering knots of flowers on May-day, or, to use the ordinary phrase, “to go a-Maying.”

Of course, there are no nuts to be gathered in May.

E. Cobham Brewer 1810-1897. Dictionary of Phrase and Fable. 1898.