It's still going to take less energy and fewer resources to just grow the food normally and store it, and even just eat the goo directly than to reconstitute it atom by atom into anything else. Star Trek technology is only efficient because the writers don't care about things like thermodynamics or E=MC^2. In the real world a replicator would need to consume ocean-boiling levels of energy to assemble a cup of early grey tea, and because we don't have "Heisenberg compensators" in our reality, it would definitely be at least a little radioactive, and not entirely tea.
I don't think they convert energy into matter directly as you suggest; they have substance A which they convert into energy and then convert than into substance B. They're not using energy as input and they're maintaining the total amount of energy/matter. At least that's the impression given in the early show; I'm sure they went of the rails at some point.
In any case, if we want to discuss a realistic implementation of this (which is probably at least a century away), we'd likely use some form of nanotechnology to recompose waste into food. But again, without "creating" matter, simply rearranging it.
>we'd likely use some form of nanotechnology to recompose waste into food. But again, without "creating" matter, simply rearranging it.
Nanotech isn't magic. The process would still require energy and would create more waste than can be possibly recovered, and diminishing returns would be inevitable. There's no perfect system possible here, entropy can't be cheated.