If you damage your mattress, your warranty is highly unlikely to cover it. Warranties are meant for problems caused by the manufacturer, such as errors or defects. Warranties almost never cover damage like spills and tears. In fact, things like these can void your warranty even if it turns out there is a manufacturer error!
That’s why you need to read the fine print beforehand. Everything from using box springs instead of a foundation to laying your mattress on the floor to failing to put a protector on it can void your warranty. So it’s best to be informed.