Cool idea. Just like a water bed, I'd be concerned about floor loading, but, yeah, that'd work, as long as no intruder lifts the mattress to see what might be hidden there.
I'd like to see the source to see if whoever did that first thought no one would ever find the safe that way, or if they were just trying to have a usable safe in an area of little floor space, like your post title says. You can also get a floor-mount safe, sits between joists, presumably under carpet. Again, hidden to casual eye, not to professionals.