I could not find this specifically for 401k, but since a 401k can be rolled over into an IRA, it may be the same rules. See
http://www.irs.gov/publications/p590/ch01.html#d0e2986
If you are a spouse, you can either leave it as it is, with you as beneficiary, or roll it over into your own IRA or other retirement plan. A direct trustee to trustee transfer would avoid any withholding.
A beneficiary who is NOT a spouse has to leave it in the name of a trustee FBO the deceased, if they want to maintain its tax deferred status.
In either case, the money has never been taxed, so normal income tax is due as money is distributed from the account.
Also see
http://www.irs.gov/publications/p590/ch01.html#d0e5343 and read down including "IRA Beneficiaries"