The creation of NaOH is exothermic and will likely release enough energy to ignite the hydrogen gas, which will burn explosively with the oxygen in the atmosphere. Sodium reacts violently with water because it is much more active than hydrogen.
Here
is the displacement reaction with water.
2Na(s)+2H2O(l)→2Na+(aq)+2OH−(aq)+H2(g)
s=solid, l=liquid, aq=aqueous