You can definitely find perfect spots for camping in a huge area of Casa de Campo natural park. It's close to the center and there are water taps all over the place as well (not sure if it's drinkable though, cause there are warning signs in some places of Madrid about that).
You can also camp in the "Ciudad universitaria" area. The campus is huge, with plenty of parks and green areas. Its close to the centre but also still away from everything (there is a sort of forest starting there, so no big buildings, traffic, or much people) and empty during the night. Some people parties over there in the night, but if you walk around a little staying away from the main street you can tell apart the quiet areas easily.
Centro Cibeles is a cultural center in the old council building where you can find free wifi, newspapers of the day, books, exhibitions and very confortable couchs for a little nap. Excelent place if you need free internet and electricity to work with your laptop/ charge your phone. The view from the rooftop worth visiting. Be sure you are not homeless-looking, otherwise the security may not let you enter.
Free wifi 24 hours in front of Apple store in Puerta Del Sol.
You can take a good bath in Rio Manzanares. If you'll go north along the river on Anillo Verde Ciclista path (a section between M-500 and A-6 motorways) you'll find some good spots to take a bath (in many places river is shallow, but it's possible to lay down and immerse yourself fully, it becomes more narrow and deep close to A-6). It's also possible to camp there. Water is nice and clean enough and it's pretty warm in the summer as well. It's also a quiet place with no people around you watching, just some cyclists passing by from time to time.
Campo de Cebada is a good place to hang out, is always full of alternative people and police never enter inside. Excelent place to go with a can of beer and meet local people, sometimes you can find gigs or even cinema there, but sometimes is not open. You can find this place in La Latina metro station.
Citizen laboratories are created in vacant city spaces. Twenty have opened in the last few years, including La Tabacalera, Esta es une plaza and Campo de la Cebada. Each specialises in a particular field, such as agriculture and urban economy, social and cultural integration, collaborative art or digital economy. An introduction to the scene can be found here.