The study is the first to find a link between health and the visibility of water, or "blue space".
"Increased views of blue space is significantly associated with lower levels of psychological distress. However, we did not find that with green space," said Amber L Pearson, assistant professor at Michigan State University in US.
Using various topography data, the researchers studied the visibility of blue and green spaces from residential locations in Wellington, New Zealand, an urban capital city surrounded by the Tasman Sea on the north and the Pacific Ocean on the south. Green space includes forests and grassy parks.
The survey used the Kessler Psychological Distress Scale, or K10, which has proven to be an accurate predictor of anxiety and mood disorders.
More From This Section
Mental health disorders are the leading cause of disability worldwide, according to the World Health Organisation (WHO).
Even after taking into account residents' wealth, age, sex and other neighbourhood factors, the study found that having a view of the ocean was associated with improved mental health.
Pearson said that visibility of green space did not show the same calming effect.
"It could be because the blue space was all natural, while the green space included human-made areas, such as sports fields and playgrounds, as well as natural areas such as native forests," Pearson said.
The study appears in the journal Health and Place.