Stochastic Variational Method for Viscous Hydrodynamics