Several factors can cause mattress sagging:
Improper bed frame
Improper center support
Damaged or bent frame
Damaged/broken box spring
Using an appropriate bed frame with proper center support and taking good care of your box spring greatly reduces the chances of mattress sagging.