Donate your mattress to an acquaintance, a church group that collects items for people in need, or a local homeless shelter or battered women's shelter. You can also try donating to chain thrift stores, but many thrift stores don't accept used mattresses because of the risk of bed bugs.
Another option for donating your used mattress is to post it on a give-away site, such as Freecycle.org. If someone is looking for a mattress, he can contact you through the site to set up a pickup or drop-off appointment. If you are unable to donate your used mattress, consider recycling it instead to keep it out of landfills.