I have also found this info on Campervan Life:
Camping Osuna
Avda. de Logrono, near the airport, just north of the NII road to Barcelona. Not signposted.
tel: 917 410 510
Reasonable campsite. Has a good popular bar, and plenty of shade. Can be noisy with noise from the airport. Easy walk to the Canillejas/Campo Metro station. Next to the massive Juan Carlos parque, which is a great place to walk and cycle. Expensive, but it is a city campsite.
Free camping in Madrid:
Try the park around the Camping Osuna campsite. There are some car parks off the roads which are ok for free camping. Madrid is a big city though, so take care with crime.
Parking in Madrid
Parking in the city area is not a good idea. To avoid getting into the city try parking around the parks at the airport, near the Camping Osuna campsite. You can then take the Metro to the city. There are also secure parking facilities here, catering for the airports, if you want to leave your vehicle and stay in a hotel in the centre.
________________________________________
Around Madrid:
Getafe
A fairly industrial area, 18kms from Madrid.
Campsites in Getafe
Camping Alpha
tel: 916958069
Very helpful staff. It can be noisy as it’s close to a road and an industrial estate (Poligono). Used by Spanish week-enders but in the winter it is quiet. Hard standing. You can get into Madrid using bus and metro quite easily. Madrid is not an easy city to drive in!
El Escorial:
43 kms NW of Madrid.
Campsites in El Escorial
Camping El Escorial
A large holiday site. Has a supermarket and a summer opening swimming pool. Good sports facilities. Expensive.
Aranjuez:
50 kms from Madrid.
Campsites in Aranjuez
Camping Soto del Castilla
Very quiet and well kept on banks of river. Moderately priced.