My 2cents....
I would avoid the underground when the bars close. Its full of really obnoxious drunk people and can be quite crowded and unpleasant. I tend to take night buses or just walk. I would also agree about Soho. Have you thought of going up to Islington? Its lovely up there, lots of night life and not obnoxious.
As for Edinburgh, stay in the center and you'll be fine, the other train station area (haymarket) to be a bit seedy. Where are you staying in Edinburgh? I wouldn't hang out in Leith at night either, but its lovely during the day, ditto for the Botanic Garden.
lala