You know you get those images that try to explain gravity and it always looks someone's put something heavy on a stretched piece of fabric. When really that sloping down to centre is just a 2d representation of an effect that happens in 3 dimensions.
How come the solar system seems to fall into that 2d representation with all the planets near enough on one plane? I'd of thought that the planets would be just as likely to orbit the sun in all kinds of inclinations but they dont...
The cloud of gas and dust that formed our solar system was originally spinning. As it collapsed, it had to remain spinning, because of conservation of angular momentum. Like an ice skater pulling her arms in, as it collapsed, it spun faster and faster, and so spread out in the plane of rotation like a tossed lump of pizza dough.
There's also the matter of collisions - in the cloud, there's about as much up motion and stuff above the plane as there is downwards motion and stuff below the plane, so through collisions those velocities cancel out and the cloud flattens. Likewise, anything going the wrong direction in the plane is slowed down and reversed through collisions with the bulk of matter moving the correct direction.
This is why the disk part of spiral galaxies exists, why Saturn has rings instead of a cloud surrounding it, and why the Solar System is (mostly) flat. (It's not 100% flat - the orbits of the planets are all slightly tilted. But it's very flat. )
One has nothing to do with the other. The analogy of 3D space to a 2D fabric is just that, an analogy to aid in visualization. Space is still in reality 3D and the warping of space doesn't pull in a single direction, it slopes in all directions towards the center of gravity. And just because the accretion disk is approximately flat doesn't mean it's 2D.