The best way to get rid of cigarette odor in a mattress is by spraying it with distilled white vinegar. Sprinkling baking soda on the mattress can also help remove cigarette odor.
Vacuum the first side of the mattress to remove any dirt and debris. Spray the mattress with distilled white vinegar and let it sit overnight. After cleaning the first side of the mattress, flip it over. Vacuum and spray the other side of the mattress. If it still has a cigarette smell, try liberally sprinkling baking soda on it. Allow the baking soda to sit and absorb the smell for a few days before vacuuming it off.