Mattresses and Box Springs are generally picked up as a bulk item with trash and taken to the landfill or incinerator. If your waste hauler will not pick up these items they can be taken to a Construction & Demolition facility for disposal. Companies offering junk removal and cleanouts will also remove bedding for a fee. If you have a newer mattress and box spring in good condition, you may want to donate it to Salvation Army, see link at https://satruck.org.
The Consumer Affairs Mattress Disposal Guide can help in deciding whether to recycle, donate, sell or have a mattress hauled away.