No chance you'd get to stay on a platform at either station without a ticket - and if it wasn't for a train due to leave imminently as most services open 30 mins before departure, you'd be spotted on the platforms and kicked out.
Chamartin is a right mess at the moment as it's simultaneously being rebuilt and has new Iryo and Ouigo services making it busier. That said, with even the cheapest cercanias ticket you could probably hang around on the furthest Cercanias platforms 12 and 13, I think, from memory, from which you can see the various HS operations (and the remaining Iberian guage stuff). Getting numbers would be a challenge for the HS though.
Atocha I'm really not sure there's anywhere very good. But
Calle Cerro de la Plata might do, and you can see pretty much everything from there. Pacifico Metro is a few minutes walk. (BTW; Atocha metro station is shut at the moment, with
no alternative link from the city centre).
(There's lots and lots of waste ground adjacent to the HS lines as they make their way out, but they're
not places I'd recommend anyone hanging around. You'd potentially attract attention, from one side of the law or the other and I'm not sure either would be too understanding.)
You
could buy a ticket to Toledo or a very cheap Avlo/Ouigo, and either take a quick trip, or try using it to stay in the arrivals end of the station - which is half way along the platforms. From the arrivals mezzanine - arriving passengers are funnelled down a different walking route to departing ones - you'd probably be OK to hang around for a while. it has an excellent view of all the HS platforms. I'd expect to be asked why I was hanging around after a while and asked to leave though.
DP