Basing yourself near Gran Vía or Sol puts you within walking distance of most of the city's pool day pass hotels, plus the Royal Palace, Plaza Mayor, and Gran Vía's theatres and shops. Dear Hotel Madrid sits right on Gran Vía itself, with Nordic-modern rooms and its own rooftop pool if you want a backup plan on a day the passes sell out.
For something more polished, Thompson Madrid sits a few streets over between Sol and Gran Vía, with a rooftop bar and a design-forward feel that suits couples or a short city break. Near Atocha and Hard Rock's Roxy Garden pool, the Gran Hotel Inglés in Barrio de las Letras is a quieter, more historic base away from the Gran Vía crush, with easy access to the Prado and Reina Sofía.
Madrid rewards travellers who mix museums and tapas with a pool afternoon rather than building a trip around one, so pick a neighbourhood for its food and culture first and treat the rooftop pool as a bonus.