My wife and I just went through this!
My flight from Boston arrived at Madrid at 5:30am (actually it arrived early, closer to 5:00am) via Iberia. I had booked a one way ticket to Valencia leaving Madrid at 8:00am. We also were made to check luggage in Boston.
So we had to go to luggage claim where we waited over an hour to get our bags, clear customs, enter the EU, take a train to another terminal, get a boarding pass (check luggage again) enlist the aid of a customer service person because we were running late and then find our gate which was at the end of a 300 yard terminal. We barely made it.
Wild.
That airport is huge. And the signage, while OK, made little sense. But we survived it all and made all of our flights. I'm not complaining. In fact, until I saw your question - I had sort of forgotten the whole event and it was only 10 days ago that we returned.
For what it is worth upon our return (back to Boston form Madrid) we allowed 2.5 hours to catch our flight and again, only made it just as boarding began.
Bottom line: it is a tough airport.
I am not savvy enough to give you advise - but I thought I'd toss in my very recent experience.