We consider the large deviations for the stationary measures associated to a boundary driven symmetric simple exclusion process. Starting from the large deviations for the hydrodynamics and following the Freidlin and Wentzell's strategy, we prove that the rate function is given by the quasi-potential of the Freidlin and Wentzell theory.