I wouldn't recommend sleeping or camping at MAD Barajas airport. Way too many people smoking inside the airport and it's not well ventilated. If money is not an issue, I'd recommend getting a room to shower, sleep and change. If money, however, is an issue, I'd recommend using baggage storage at the airport and party all night in Madrid. Nightlife in Madrid doesn't perk up until after midnight and there are tons of places in Puerta del Sol that are open till morning hours.