Latest experiments have shown that adherent cells can migrate according to cell-scale curvature variations via a process called curvotaxis. Despite identification of key cellular factors, a clear understanding of the mechanism is lacking. We employ a mechanical model featuring a detailed description of the cytoskeleton filament networks, the viscous cytosol, the cell adhesion dynamics and the nucleus. We simulate cell adhesion and migration on sinusoidal substrates. We show that cell adhesion on three-dimensional curvatures induces a gradient of pressure inside the cell that triggers the internal motion of the nucleus. We propose that the resulting out-of-equilibrium position of the nucleus alters cell migration directionality, leading to cell motility toward concave regions of the substrate, resulting in lower potential energy states. Altogether, we propose a simple mechanism explaining how intracellular mechanics enable the cells to react to substratum curvature, induce a deterministic cell polarization and breakdown cells basic persistent random walk, which correlates with latest experimental evidences.