Good question. The company I was working for at the time went bust - I'd been with them about 7 years. I just searched online for contracts (I'm actually a tech writer, not a developer, but have coding skills - there are a lot more contracts out there for coders compared to writers). My very first contract was with a wonderful web company in London.
Anyway, as to the commuting. Yes - you are right - it's a total pain in the bum. Sometimes if the gig is a long way away I will stay up in cheap B&B. It depends. But - you can put up almost anything for three months right? That's the beauty of it. You know the pain will end - you know the exact day.
The commuting is soon forgotten when you are heading out to a wreck dive by boat in the Philippines. :)
I haven't found a huge number of jobs near each other in the UK outside of London.