In the note added in proof of the seminal paper [Groups of diffeomorphisms and the motion of an incompressible fluid, Ann. of Math. 92 (1970), 102-163], Ebin and Marsden introduced the so-called correct Laplacian for the Navier-Stokes equation on a compact Riemannian manifold. In spirit of Brenier's generalized flows for the Euler equation, we introduce a class of semimartingales on a compact Riemannian manifold. We prove that these semimartingales are critical points to the corresponding kinetic energy if and only if its drift term solves weakly the Navier-Stokes equation defined with Ebin-Marsden's Laplacian. We also show that for the case of torus, classical solutions of the Navier-Stokes equation realize the minimum of the kinetic energy in a suitable class.