You might have a look at Hatcher and Thurston's paper "A presentation for the mapping class group of a closed orientable surface". They use Morse functions on the surface to facilitate the derivation of their presentation. On page 223 and following, they discuss how to form a graph from a Morse function on a surface, which is the leaf space of the level sets of the Morse function. This graph, together with its map to $\mathbb{R}$, uniquely determines the Morse function on the surface (up to graph isomorphism preserving the function). In particular, one need only know the values of the Morse function at the vertices of the graph (corresponding to the critical points of the Morse function on the surface) since it is monotonic on each of the edges. The space of such functions will therefore be parameterized by a subset of a vector space, satisfying certain inequalities. As they indicate on p. 224, the surface with the Morse function may be recovered from the graph (with its Morse function) by embedding it in $\mathbb{R}^3$ and taking the boundary of a regular neighborhood (after a small perturbation).
You might have a look at Hatcher and Thurston's paper "A presentation for the mapping class group of a closed orientable surface". They use Morse functions on the surface to facilitate the derivation of their presentation. On page 223 and following, they discuss how to form a graph from a Morse function on a surface, which is the leaf space of the level sets of the Morse function. This graph, together with its map to $\mathbb{R}$, uniquely determines the Morse function on the surface (up to graph isomorphism preserving the function). As they indicate on p. 224, the surface with the Morse function may be recovered from the graph (with its Morse function) by embedding it in $\mathbb{R}^3$ and taking the boundary of a regular neighborhood (after a small perturbation).