Why is solid sodium hydride a base and not an acid when reacted with water?
The answer lies in electronegativity. Sodium has a significantly lower electronegativity ($\approx 1.0$) than hydrogen ($\approx 2.1$) meaning that hydrogen pulls electron density towards itself, away from sodium to generate a sodium cation and a hydride anion.

For a compound to be a Brønsted acid, you need to draw electron density away from the hydrogen, i.e. connect it to an electronegative atom such as oxygen, fluorine, nitrogen etc. Only then can it formally be described as $\ce{H+}$ and can dissociate as such.

A hydride is much better described as $\ce{H-}$ and has a free lone pair. As such, it is a Brønsted base, not an acid. In fact, if you extend the Brønsted acid/base definition in the way Lewis did, you will arrive at the sodium ($\ce{Na+}$) being the acidic species here.

The Brønsted acid/base reaction product of the base $\ce{H-}$ and the acid $\ce{H+}$ happens to be $\ce{H2}$, and because the acidic hydrogen is abstracted directly from water (hydrogen gas can bubble away, shifting the equilibrium even if the reaction were not thermodynamically favoured), $\ce{OH-}$ ions are left which can be written with the remaining $\ce{Na+}$ cation to give sodium hydroxide.