Legendre Transformation for a Hamiltonian Linear in momentum

Is there any way to compute the Legendre Transformation of a Hamiltonian which is linear in momentum, for example, a crazy Hamiltonian like

$$H(q,p) = \alpha p q + m\omega q^2 .$$

This function is convex (and also concave) in $$p$$, which is a sufficient condition for the Legendre transformation to work (as far as I know). However if I try to find $$\dot{q}(p)$$ , which I would normally then invert and sub into $$p \dot{q} -H(q,p)$$, I get stuck because $$\frac{\partial H}{\partial p} = \dot{q} = \alpha q.$$

No, when we consider the action principle $$S=\int\! dt(p \dot{q} -H(q,p))$$ for OP's Hamiltonian, then $$p$$ acts as a Lagrange multiplier that imposes the EOM $$\dot{q} \approx \alpha q$$. This EOM does not have a regular Lagrangian formulation, i.e. a formulation without the use of other variables than $$q$$.