Check to see if any local thrift shops or charities will accept your mattress as a donation. Some mattresses can easily be refurbished and donated to others in need. Contact your local Goodwill or Salvation Army to see if they can accept your mattress. Some states have strict health regulations regarding mattresses, so you may not be able to donate the mattress directly to a charity.
There are several websites that can be used to give away items to others in your community. You can advertise your free mattress on Craigslist or The Freecycle, both of which allow users to connect with one another to sell or give away items to others in the local community.
If you are unable to donate or give away your mattress, check for a mattress recycling center in your area. While not yet prevalent in every part of the country, mattress recycling centers have been opened in parts of California, Massachusetts and in other states throughout the United States. You can search for recycling centers on any standard search engine. You could also use Earth911.com, which is a site dedicated to helping you locate recycling centers for specific items.