We estimate the $L^2$ norm of the restriction to a totally geodesic submanifold of the eigenfunctions of the Laplace-Beltrami operator on the standard flat torus $T^d$, $d>=2$. We reduce getting correct bounds to counting lattice points in the intersection of some transverse bands on the sphere. Moreover, we prove the correct bounds for rational totally geodesic submanifolds of arbitrary codimension. In particular, we verify the conjecture of Bourgain-Rudnick on $L^2$-restriction estimates for rational hyperplanes. On $T^2$, we prove the uniform $L^2$ restriction bounds for closed geodesics. On $T^3$, we obtain explicit $L^2$ restriction estimates for the totally geodesic submanifolds, which improve the corresponding results by Burq-Gerard-Tzvetkov, Hu, Chen-Sogge.