A thin Lie algebra is a Lie algebra graded over the positive integers satisfying a certain narrowness condition. We describe several cyclic grading of the modular Hamiltonian Lie algebras H(2: n; ω2) (of dimension one less than a power of p) from which we construct infinite-dimensional thin Lie algebras. In the process we provide an explicit identification of H(2: n; ω2) with a Block algebra. We also compute its second cohomology group and its derivation algebra (in arbitrary prime characteristic).