The embedding of the manifold into a 5-dimensional flat spacetime leads to a relationship between the gravitational metric potentials. The embedding condition is solved to obtain a new exact solution for an anisotropic matter distribution. We show that the potentials are well behaved, the matter variables have realistic profiles and the solution can be utilized to construct relativistic compact fluid spheres. A detailed investigation of the astrophysical objects 4U 1538-52, Her X-1 and SAX J1808.4-3658 is undertaken. The predicted radii generated through the observed masses for our models are consistent with the above astrophysical objects and indicate that the new exact solution represents compact spheres. The study reveals that complicated geometries arise from embedding and they are physically relevant in the study of observed compact bodies.