The words market garden aren't normally used to describe Walthamstow, a built-up corner of north-east London better known for the greyhound stadium that closed last week. But amid the rows of Victorian and Edwardian terraces there's a thriving home-grown food industry.

Last year a small group of volunteers picked 12 tonnes of fruit, that would otherwise have rotted, from gardens and street trees across the borough.

OrganicLea's scrumping scheme lets householders keep 25% of the fruit collected, while the rest is sold at the co-op's market stall or turned into juice.

Clare Joy of OrganicLea estimates that even in such urban areas, one in four detached or semi-detached houses have fruit trees in their garden, yet much of it simply goes to waste.

"It ranges from street trees and pub gardens to residents who are housebound and unable to pick themselves, and pear-tree owners who are sadly not that keen on pears. We discovered a beautiful Victorian kitchen garden with orchard and hothouse but lacking the full-time gardener it would once have had."

Meanwhile, some allotment holders are fighting the credit crunch by swapping their surplus goods for a free pint down the pub. At The Pigs in Edgefield, near Holt, Norfolk, customers are greeted with a sign that reads: "If you breed, grow, shoot or steal anything you feel may be at home on our menu, ask at the bar. Let's do a deal."

So far, pints have been swapped for potatoes, mackerel and a kilo of fresh fruit. Pub regular Derek Feast, 64, exchanges his free-range chicken eggs for a pint. "I have a job where I earn the national minimum wage, so this little bit of extra money helps me get out," he told the Daily Telegraph.

Organised food swaps - a sort of urban village fete where you can get good food for free by swapping what you've brought - are becoming popular across Britain. The first Great Food Swap was staged by Growing Communities (growingcommunities.org) in October 2006 in Stoke Newington, north London. It was so overwhelmed by visitors that it has now become an annual event.

The summer may have been a washout, but the wet and warm conditions have been perfect for cucumbers, squash, courgettes and marrows. If you want to sell your bumper crop rather than swap it or give it away, it's not easy. Some allotment associations occasionally rent stalls at farmer's markets, but the cash earned is usually ploughed back into association funds.

There are some weekly stalls at year-round markets where allotment holders can take their surplus for sale. OrganicLea runs a weekly market stall, primarily supplied by a farmers' co-op in Norfolk, but it also offers surplus produce from local allotments. The stall takes 25% and the allotment holder gets 75% of whatever is made.

There's also the option of roadside sales, which are particularly popular with small-scale egg producers. Just five backyard chickens can easily lay 1,250 or more eggs a year, leaving the average family with a surplus of dozens of eggs every week.

According to allotment.org.uk, so long as your roadside sales are surplus, and production is not at commercial levels, you can rely on a technical exemption called "farm gate sales".

But take them to market and the Egg Marketing Inspectorate will be watching to make sure that each one is marked with a producer code number. You are also not allowed to sell to any catering establishments.

The law on selling surplus produce from allotments confuses some smallholders. Many allotment associations tell members it is against the law to sell their goods, but that's not entirely correct according to Bryn Pugh, legal consultant to the National Society of Allotment and Leisure Gardeners. "Strictly speaking, produce from allotments cannot be sold, but there should be no objection to the occasional sale of surplus produce. What is prohibited under the Allotments Acts, 1908-1950 (section 22, subsection 1) is that an allotment cannot be used to support a business."

But he says that if an allotment holder can prove they have more than they can use themselves, it won't be regarded as illegal to sell the surplus. "There are only so many courgettes you can eat in a week," he says.

Bend the rules too far, however, and you'll be the disgrace of the green-fingered community. In one case in north-west England last year, an allotment holder was found to be growing soft fruit purely for his wife's jam-making business. "The tenant was removed. It is totally against the ethics of allotment gardening," says Pugh.