How about adding two features like this (EDIT: corrected)
sin(2 * pi * hour / 24)
cos(2 * pi * hour / 24)

The combination should allow the model to assimilate the notion of hour in a continuous, real-valued, yet circular way.