We have a 10 hour layover in Madrid airport… is there anywhere to sleep
A quick look on booking.com shows at least a dozen options within 2 mile and offering shuttle service.
What '10 hours' are you there? Where are you coming from and where are you going? Depending on what your travel plans are you may have a lot less than 10 hrs to while away.
using a simple internet search -
general info - https://airportssleepingguide.com/sleeping-in-madrid-barajas-airport/
HelloSky rooms - https://hellosky.travel/locations/ (by the hour or overnite)