San Lorenzo de El Escorial is situated at around 50 kilometers North-West of Madrid.
For the jet lagged, luggage bound, and tired traveller -- we would recommend to take a taxi from Madrid Barajas airport to Moncloa Metro/bus station, and there to board the 661 bus (Madrid to San Lorenzo de El Escorial). The bus will drop you within 30m of the hotels. The taxi from Barajas to Moncloa will cost - about 3000 pts (18 ). The bus fare is about 1000 pts, with the ticket being purchased on the bus. For your information, taxi from Barajas Airport to San Lorenzo de El Escorial will cost around 10.000 to 12.000 ptas (60 - 72 ).
You can take the train all the way to El Escorial - but unlike the bus it does not go to San Lorenzo, and leaves you at the train station 1.5 km short of the hotels.
In summary - We would advise the simple taxi + bus option. It is fairly direct and not too expensive.