In this article, we present a notion of the harmonic oscillator on the Heisenberg group H-n, which, under a few reasonable assumptions, forms the natural analog of a harmonic oscillator on Rn: a negative sum of squares of operators on H-n, which is essentially self-adjoint on L-2(H-n) with purely discrete spectrum and whose eigenvectors are Schwartz functions forming an orthonormal basis of L-2(H-n). The differential operator in question is determined by the Dynin-Folland group-a stratified nilpotent Lie group-and its generic unitary irreducible representations, which naturally act on L-2(H-n). As in the Euclidean case, our notion of harmonic oscillator on H-n extends to a whole class of so-called anharmonic oscillators, which involve left-invariant derivatives and polynomial potentials of order greater or equal 2. These operators, which enjoy similar properties as the harmonic oscillator, are in one-to-one correspondence with positive Rockland operators on the Dynin-Folland group. The latter part of this article is concerned with spectral multipliers. We obtain useful L-p-L-q-estimates for a large class of spectral multipliers of the sub-Laplacian L-Hn,L-2 and, in fact, of generic Rockland operators on graded groups. As a by-product, we obtain explicit hypoelliptic heat semigroup estimates and recover the continuous Sobolev embeddings on graded groups, provided 1 < p <= 2 <= q < infinity.