@icanbewhatiwant you could dispute it though through the organisation that holds the deposit? How convenient that he's thrown the mattress away. I bet loads of students end up moving into properties with stained mattresses in situ.
I think most landlords really take the 'P' massively with students, and £500 for a new mattress (which may need to be replaced again next year if the same thing happens with new tenants) is OTT. Just done a quick 'Google' search and plenty of double ones for under £200 (which is really about the right price point in a student house, surely)?
The landlord is probably riled now because of your DS1's flatmate's dad taking him to court. Mind you, I don't blame him!