My vote is to head straight for Madrid. Get a first-class train ticket to Madrid and catch up on your sleep. Alternatively, since you're at the airport why not get a flight to Madrid?
My wife and I are traveling from Barcelona to Zaragoza to Madrid and on to Seville in late October. As you're planning to do, we're spending 3 nights in Madrid. We'll make a day-trip to Toledo from Madrid one of the days. If you arrive in Madrid early afternoon of the 31st. I've heard you can enter the Prada after 17:00 hr. with no admission charge. An added perk. Perhaps spend September 1st, 2nd and part of the 3rd in Madrid/Toledo, then take the train to Barcelona, arriving the afternoon of September 4. If you're planning on visiting Sagrada Familia, Parc Guell, or any of the other Gaudi sites, you could pre-book an afternoon entry time on the 4th that would permit you to drop off your luggage at the hotel, and by entering the venue later in the day, perhaps avoid some of the crowds. You can see quite a bit of Barcelona if you're there the afternoon of a September 4, three full days and nights and the morning of September 8.
If you've not been to Barcelona before, an interesting "loop" to/from Montjuic is to take the aerial gondola from Torre San Sebastia (there may be a longish-line to get a ticket), to Montjuic, at the arrival point, walk to Placa de la Sardana and take the aerial to the Castle, then walk (or take the bus) to Palau Nacional d'Art de Catalunya and walk to the Magic Fountain, perhaps arriving there in time for the evening light show. At. Placa D'Espanya you can get a Metro or bus to just about anywhere in the city.