Create and manipulate height-map, save as greyscale texture
You can use Displacement baking.

Create your base grid/plane, create a new blank image and UV unwrap the plane onto it, then duplicated it.

Model/sculpt the plane (if you are using sculpting and not using dyntopo, you may want to use the multires modifier. See below).

Select the sculpted/deformed plane and the duplicate (still just a flat plane), so that the flat plane is the active object.

Enable Selected to active in Render settings &gt; Bake and set the bake mode to Displacement. If your sculpted plane goes more than half a BU above or below the duplicated plane, you may want to enable Normalize.

Press Bake. Note that currently have BI selected as the current render engine to bake textures, however this is will be available for cycles in 2.71.


Result:

Multires
If you are going to use sculpting, you could also use the Multires modifier. See This post.

Add plane, create image, UV unwrap, and add multires modifier in simple mode.

Sculpt details

Set the Preview subdivision level to zero, then bake with Bake from multires enabled:




Cycles baking
Even before 2.71 comes out, it is possible to do this in cycles by rendering your terrain top down (with an orthographic camera) and with the Z position mapped to a gradient.
See this post for details.