Even being able to see the trees from your window will be enough to help, according to investigators from the UK's University of Plymouth.
The study surveyed 149 participants aged between 21 and 65, and asked them whether they had any exposure to nature, and in what way.
Researchers also questioned them on the frequency and intensity of their unhealthy cravings.
They concluded that people who had access to a garden reported more infrequent and less intense cravings - and those with views of green spaces also had similar benefits.
Researchers also noted that the participants would reap these benefits regardless of their level of physical activity.
"Future research should investigate if and how green spaces can be used to help people withstand problematic cravings, enabling them to better manage cessation attempts in the future," said the study's co-author, Dr Sabine Pahl.
This article originally appeared on 7News