Last summer's temperatures were really weird, too high for the average, but it happened the same all over Europe. In late August, early September, the night temperatures in Madrid descend to the low 60s, so sleeping in a place without a/c should not be a problem.
I even remember a couple of years ago that I attend an open air opera in late August and I was wearing a short sleeves shirt and couldn't stand the cold and had to miss the last act. It was about Aug 25. BTW, during the summer there is an open air movies/opera/theater/concerts program called Veranos de la Villa (Village Summers; Madrid, is technically, still a village, doesn't have the title of 'city') that is pretty interesting.