$50 per week is more affordable to most people than $1000 up front. So the customer is more likely to buy it, and the store ends up 50*22 = $1100, so $100 more (which might seem worth it for the customer if they get to pay it over 22 weeks).
Some people might also be enticed by the low price of $50 and think its cheaper.
By doing so, they provide the illusion that the payments are cheaper then 1000 dollars, because 50 looks very small, when in reality it's $100 more then what the mattress is actually worth.