To every convex function $\psi$ tending to infinity at infinity we can associate its moment measure, which is the image by the gradient of $\psi$ of the measure with density $e^{-\psi}$. We aim at characterizing all the measures that can be obtained as moment measure of some convex function. This will be done by studying a variational problem that is closely related to the one of optimal transportation theory. This variational problem can be studied using tools from the geometry of log-concave measures.