In fact, no grammatical rules concerning the spelling of this word does not exist. You can say and write whatever we want, and that is the "mattress" and "mattress" is the correct answer. This answer will be obtained if you follow the new rules of the Russian language, adopted in the twenty-first century.
For the first time this word is mentioned in the time of Peter the great. It was he who brought from Europe the first feather mattresses. Because at that time the language was a little rougher, it was to spread the word with the letter "C" on the end, that is the "mattress".
However, further studies on this subject have slightly changed the situation. The fact that the founder of mattress production are the Netherlands and in their own language the word is written as matras. Accordingly, it would be correct to write this word, "mattress", but the population has already used to speak differently, and there was no reason to change the spelling.
There is an assumption that "C" at the end was the result of the influence of the German language, which was also distributed in Russia during that time period. In German this word is written as matratze in Russian is read as "the mattress".