Madrid is a Lady. As such, she has decided that May is the time of year she will change her mind every ten minutes, and God rest the soul of any poor slob (male), who tells her she can't.
As a "veteran tourist" of May weather in Madrid, I've seen a 55 degree F change in temperature between night and midday. You dress warm to start, and begin your impersonation of Gypsy Rose Lee as the day goes on... stuffing all that heavier clothing in your knapsack as you go. Then, if you're still out and about in the evening, you pull those wrinkled clothes out of the knapsack, put them back on, and look like you just woke up from a siesta in a laundry bag stuffed full of clothes.
Wolf