The equations of general relativity are entirely real.
But we're not talking about those. But with respect to general relativity, anyway:
The topology of spacetime is affected by the presence of mass and energy.
First of all, "topology" is the wrong word; you probably meant to say "curvature," which is not a topological property (topological properties are only those invariant under homeomorphisms, which include bicontinuous changes in metric). Secondly, even with the word curvature substituted for topology, it's not fully accurate either. The point of view you are describing is encouraged by analogies such as the rubber sheet analogy, basically your mattress analogy, in which spacetime is visualized as a rubber sheet and a mass is visualized as a ball resting on the sheet.
The problem with the analogy is that, in general relativity, the actual object under consideration is the
stress-energy tensor. Matter and energy are represented as a tensor field in spacetime, and that tensor is called the stress-energy tensor. In short, matter and energy are represented in the theory
by the curvature of spacetime itself. Matter and energy don't simply influence the curvature; they
are the curvature, at least in terms of the theory.
To highlight the defect of the rubber sheet analogy, in terms more precisely aligning with the actual theory, there is no ball resting on the rubber sheet, there is only the rubber sheet itself. The ball exists only in the analogy to suggest some reason why the rubber sheet is deformed. It is an error to suppose that material objects exist apart from spacetime, because in terms of general relativity, they don't.
You could not beam matter with a transporter without recreating at the destination the exact curvature of spacetime that existed at the source, with respect to every particle constituting the object beamed. Transport would not be
complete until the curvature of spacetime in the vicinity of each particle was set as it was at the source. If the curvature were not set by the transporter, then each particle comprising the object would have no mass when transport was complete, and probably the whole object would get totally converted into pure energy that would explode at the speed of light the instant that the transporter beam was disengaged.
And let's also keep in mind that general relativity has not been unified with quantum mechanics in any way that is generally accepted and empirically useful. The classical field of electromagnetism is represented in quantum electrodynamics by interactions of photons, the force exchange particle. In fact, every force in quantum mechanics has force exchange particles. Gravitons have yet to be discovered. But if they are discovered as quantum particles, that will entail a rewrite of general relativity.