It would be a reasonable assumption to make to think this expression comes from A Midsummer Nights Dream.
In fact it is from Shakespeare’s Twelfth Night, 1602.
It concerns the comic scene in which Malvalio is taken with the mistaken belief that his beloved wants to see him to wear crossed yellow stockings:
Malvolio. ‘Remember who commended thy yellow stockings,’
Olivia. Thy yellow stockings!
Malvolio. ‘And wished to see thee cross-gartered.’
Olivia. Cross-gartered!
Malvolio. ‘Go to thou art made, if thou desirest to be so;’ –
Olivia. Am I made?
Malvolio. ‘If not, let me see thee a servant still.’
Olivia. Why, this is very midsummer madness.