I have lived in four countries in the past 8 years, so I can definitely relate with you. Honestly, I was always the type to just stick my money in a savings account (dodges facepunches) or at best, a high yield savings account.
With my most recent move to the US, I have a 401k through my employer, an IRA, and a taxable account.
Based on my research (and it may be different for Japan), there are a few steps to taking out the money when I quit my job/leave the country:
1. Roll 401k into IRA
2. Transfer IRA into retirement account back home (Canadian RRSP for me). If under 59.5, a withholding tax may apply on the US side. This may or may not be claimed as a foreign tax credit on the Canadian side.
3. If the hit can't be avoided, leave the damn thing in the US until 59.5 and transfer without withholding penalty; Canada allows for retirement accounts to be held in the US and tax deferred as long as the funds are not withdrawn.
For you, you should look into the tax treaty between your country/US. I think the two main things would be 1. Can you keep your investments here tax deferred, and 2. What is the penalty for early withdrawal?
I'm interested to hear what other people plan on doing.
Cheers,