In Electrum you can export the master key easy, but you have to disable the password first (for security reasons).
A better way is to go to the console and enter
getmasterprivate(). It will prompt you for your password, and then after you enter it, display your master private key.
If I'm not mistaken the password will remain in the console history and you can see it by scrolling up with the arrow key .
If you do it manually like I wrote, there will be no trace of the password.
