When I get fleas on my mattress I use dawn dish soap in an upholstery cleaner.
Dawn dish soap kills fleas on dogs as well so give your dog a bath using dawn dish soap and the fleas will be killed on your dog.
The dawn dish soap also works really well in the upholstery cleaner for cleaning the mattress as well as killing the fleas.
Whenever I find that fleas are jumping on me from my mattress I get out the upholstery cleaner and use dawn dish soap in it and it works every time.
You can also get rid of fleas on your mattress and carpets by sprinkling some flea powder on the carpets and mattress and let it sit all day and then take a vacuum cleaner and clean the dead fleas and flea powder off your mattress and carpets.
Then also use the dawn dish soap in the upholstery cleaner to clean your mattress off again to get it really clean.
You can do the same thing for getting fleas off of couches and other furniture in your home.