Let \Delta be the Okounkov body of a divisor D on a projective variety X. We describe a geometric criterion for \Delta to be a lattice polytope, and show that in this situation X admits a flat degeneration to the corresponding toric variety. This degeneration is functorial in an appropriate sense.