I have checked bags overnight at MAD more times than I can count and have never had a problem. In my student days, before flying to the family home, I even used to check the bags the day before at the Nuevos Ministerios train station, so I could leave directly to the airport from the university. More recently, I often make a stopover in Madrid before flying back to my current base in the US and drop the bags overnight (in normal trips I always go hand-baggage only, but as an expat it is not possible to avoid some luggage a couple of times a year).