In the middle of the concrete, buildings, metal signage and car parks which make up Edinburgh Western General Hospital, there is an oasis where birds sing arpeggios and the air is heady with vegetation.

A few metres from this haven, patients - their faces etched with worry - make their way to appointments, staff clasping folders march briskly by and taxis grumble on the kerbside. But down here, at the foot of the hill, among the shrubs, time unravels at a more leisurely pace.

We are in the garden of the original Maggie's Centre, a drop-in centre which opened its doors 18 years ago and has been a place of contemplation for those in the throes of cancer treatment. Tucked behind the hedge and enjoying the blooms is Karen Laing. As a survivor of breast cancer, she sought peace among these plants. Today, she is the gardener.

Laing, 53, has always been a keen gardener and in her native Aberdeen she worked on The Beechgrove Garden as a consultant garden designer. With a degree in fine art, teaching was her bread and butter, but after her two sons left home, she began to fantasise about making her hobby her career. After enjoying success in design competitions - she was a finalist in a contest to design a garden for the RHS Malvern Spring Show and was selected to design a plot at the Avant Gardens festival at New Hopetoun - she began a masters in landscape architecture at Edinburgh College of Art. "I'd just started the course and my mum phoned to say she had been diagnosed with bowel cancer."

Shuttling to and from Aberdeen to support her mother while studying made for a stressful time, but Laing's mother was eventually given the all-clear. Unfortunately, it was not the end of the family's dealings with the illness. "Just after I'd graduated my sister phoned to say she had been diagnosed with breast cancer. That was really harrowing."

Prompted by the news, Laing got herself checked out. Following a discrepancy in her mammogram she too was diagnosed with breast cancer in August 2009. Within weeks she underwent surgery followed by chemotherapy and radiotherapy. "I found myself in a strange city away from my family going through difficult times and that's when I came to Maggie's and they rescued me, big time," she says.

Maggie's Centres are a network of places in hospital grounds across the country which offer emotional and practical support to people affected by cancer. While many patients utilise the classes and therapies on offer, others drop in for a chat and a cup of tea after treatment. Laing spotted the centre while gazing out of the window during chemotherapy. For her, the potager formed an intrinsic part of her healing process. In common with a growing body of research on green spaces, Laing believes simply being in the garden offered a chance to disconnect from her stresses and gain a different perspective on what she was going through.

"There was a PhD done on the quality of time spent in the garden," she says. "It referred to the density of time. When you come into the garden, time takes on a whole different meaning. The pressure is removed.

"Say you are sitting waiting to see your consultant for two hours and there are a lot of stressed people - you can imagine absorbing all that negative energy. Then you can come somewhere like this and sit. Everybody who is into gardens knows there is something about an unstructured space that makes you feel good."

Research by the University of Essex, published in January, found that moving to a green space had a lasting effect on wellbeing, compared to other factors such as promotion, a pay rise or even a lottery win, where the boosts were short term. The study, using data from the British Household Panel Survey of 40,000 homes, compared lottery winners who had won more than £500,000. After six months their happiness levels had returned to baseline while those who had moved to a green space were still reaping the benefits three years later.

The boost from working in a garden has long been understood by mental health charities. This month, the Scottish Association for Mental Health, along with Jo Malone London, unveiled a herb garden within Redhall Walled Garden in Edinburgh. The charity is to offer training in horticulture and conservation to people suffering mental ill health.

For Laing at Maggie's, it was the immersive experience of being in the garden which helped her deal with her treatment. "One of things I found joyful was how bountiful it was; full of smells and colours. Some volunteers planted sarcococca because they are fragrant, so as people were passing there was a nice smell wafting through."

Of all the senses, smell can short-cut people back to a particular memory and most of us have happy associations with garden scents. "The box hedge always takes me back to visiting my grandparents because it was the first time I smelled that smell," says Laing. "I don't even know where that garden was, but it gives me a feeling of sunshine and joy because I was skipping around when I was young."

When it came to her treatment, the teeming signs of life offered an alternative way to think about her body. "It's difficult for me not to think of taking dead branches out of the box hedge in the firm knowledge that when I take those out the new growth will come and the thing can mend. That was making me think of the surgeons taking out the tumour. When they take that out, new growth will take over and your body can heal.

"There are lots of analogies with plants and life cycles. Even when you see plants dying it gives you a great sense of optimism because you know they are going to come again. You see time passing and you think: 'It gets better, it's OK.'"

The ethos behind the design of the centres is for the gardens to merge seamlessly with the buildings in a way that founder Maggie Keswick believed enhanced patient recovery. The Edinburgh centre was the first of 15 across the UK. "It was about building a homely centre with a nice garden to look out on. It is stunning, but as the centres have evolved they are understanding more that the outdoor space is a beneficial therapeutic space, so the design of the gardens has become key," explains Laing. "One thing people get is that they come through this cancer journey and they feel like a better person. I wouldn't give it to anybody, but I wouldn't undo it, but then I'm lucky because I have a positive prognosis because I was caught early. The medical staff were brilliant, but they haven't got the time to hug you and look after you in the way many people need. Maggie's fills that gap."

With her treatment behind her, Laing was keen to maintain a connection with the Maggie's family so she took the job as gardener. She believes the garden is a hook which can catch people who might not otherwise approach the centre. The sight of a beautiful flower or someone tending a shrub might cause someone to walk over and start chatting, someone who never consider signing up for a therapy session.

Dave Allan, an organic gardener and this magazine's gardening writer, has always known of the therapeutic benefits of spending time in green places, but it was only when he suffered a near fatal accident that he had cause to put them to the test.

It was 31 years ago and Dave had given up his teaching career to take over a large plot of land near Hawick with his wife to live "the good life", as he puts it. Shortly after making the move he was caught in a storm while driving on the M8. "The wind blew the whole gantry out. I was driving underneath and one of the pieces landed in my forehead."

Had the accident not happened close to the Southern General Hospital, he may not have lived. "I was in there very quickly and was in intensive care for a fortnight. It wasn't clear if I was going to survive or not. June, my wife, was with me at the time and was four months pregnant so it was pretty grim. I lost the sight in one eye and I've only partial sight in the other. They had to reconstruct my face. There was a scar on my brain tissue as well. It was traumatic."

On leaving hospital Allan, who also runs the Ask Organic gardening company, embarked on his long recovery. "Everything that drove me on at this point was the attitude," he says. "I was so glad to feel I was alive at all that it made me feel very positive." He also credits being able to spend time in his garden as being central to his recovery. "What was good was to see things living and to create life - to sow a seed, to see it grow, to help it grow, to harvest it. I was very much into fruit and vegetables, so to be able to harvest the fruits of your labour drove me on.

"I couldn't see very well but I could hear the birds and I could hear the rustle of trees. The sounds as well as the visual impact of it all is so important. Seeing tiny creatures, beetles or worms crawling around - they are all part of the tapestry of life.

"When I was transplanting a seedling, I would concentrate on that, rather than concentrating on myself. That was important. There is so much evidence that we don't understand about how green space affects us, we're hard-wired on that, but we don't always appreciate what's going on in our bodies."

It's not just those who are recuperating who can benefit. The garden can offer an escape from the hectic cadence of modern life. "Instead of frantically worrying about things or running about doing things, people relax when they are gardening, they externalise. You see something beyond yourself and that is one of the key factors. I saw living things which were beyond me and I empathised with them, not in a conscious way, but subconsciously."

Allan worries about the way plants are being forced out of the garden in recent years as people turn gardens into extensions of their home. "A lot of people regard their garden as an extra room - you've got to do in the way you've got to dust and vacuum. It's sad and I am always railing against that. The garden is a living entity - there is so much life there, just enjoy it." n

Visit maggiescentres.org and askorganic.co.uk.