It is easy to visualize some Morse functions on surfaces (such as the torus) via the height function, but this seemingly doesn't work for 3manifolds. I am looking for an explicit one on the 3torus $\mathbb{T}^3$. In paritcular:
It is true that every niceenough 3manifold admits a selfindexing Morse function $f:M\to[0,3]$ (with unique maximum and minimum), and from this we get a Heegaard diagram, with splitting surface $\Sigma=f^{1}(\frac{3}{2})$. Now apparently, a converse also holds, so that given a Heegaard decomposition we can read off a selfindexing Morse function (edit: perhaps multiple Morse functions, as per Ryan Budney's comment).
With the known Heegaard decomposition of $\mathbb{T}^3$ (handlebodies $N$ and $\mathbb{T}^3N$ for a small neighborhood $N$ about the generating 1complex $S^1\cup S^1\cup S^1\subset\mathbb{T}^3$, and splitting surface $\partial N$), what is the corresponding Morse function? I can't write one down.



The Morse function on $(S^1)^3$ that gives the genus 3 Heegaard splitting (the standard one) is basically just a smoothed "distance from the 1skeleton function". So if you think of $S^1$ as the unit circle in $\mathbb C$, then $$f : (S^1)^3 \to \mathbb R$$ is given by $$f(z_1,z_2,z_3) = z_11^2 + z_21^2 + z_31^2$$ where we're taking the norm/modulus squared of vectors in $\mathbb C$ in the above formula. The critical points are 8 triples $(z_1,z_2,z_3)$ of the form $(\pm 1, \pm 1, \pm 1)$, so you have the minimum $(1,1,1)$, maximum $(1,1,1)$, index 1 critical points $(1,1,1), (1,1,1), (1,1,1)$ and index two (the negatives of the index one critical points). If you really demand selfindexing then you'll need the function $\frac{f(z_1,z_2,z_3)}{4}$ 


After seeing Ryan Budney's function, I came up with this: On an ntorus $\mathbb{T}^n$ we have a Morse function $f=\sum^n_{i=1}\cos\theta_i$, which has critical points $\text{crit}(f)=\lbrace(\theta_1,\ldots,\theta_n)\;\;\theta_i = 0\text{ or }\pi\;\;\forall\;i\rbrace$. In particular, we get a selfindexing Morse function $f(\theta_1,\theta_2,\theta_3)=\frac{1}{2}\sum^3_{i=1}\cos\theta_i+\frac{3}{2}$ on $\mathbb{T}^3$. Indeed, it has a unique maximum $(0,0,0)$ with value 3, and a unique minimum $(\pi,\pi,\pi)$ with value 0. There are 3 index1 critical points (two angles are $\pi$ and one angle is $0$) with value $1$, and 3 index2 critical points (one angle is $\pi$ and two angles are $0$) with value $2$, and the indices are evident from the Hessian $H_{(\theta_1,\theta_2,\theta_3)}f=\text{diag}(\cos\theta_1,\cos\theta_2,\cos\theta_3)$. Now this $f$ then provides a Heegaard diagram for $\mathbb{T}^3$ of genus $3$ (since there are 3 index1 and 3 index2 critical points, corresponding to the $\alpha,\beta$curves). As Wikipedia states: It was proved by Frohman and Hass that any other genus 3 Heegaard splitting of the threetorus is topologically equivalent to this one (the one in the original question). [[Edit]]: This is precisely Ryan's function... so nevermind. 

