A friend suggested that the primary cause of Japan and West Germany's economic sucess after WW2 (by 1980 they were the 3rd and 4th largest ecomonies after US and USSR) was that the restrictions imposed by the Allies on military spending freed up that money which everyone else was spending on the cold war to invest in the economy. Is this actually the case?
It's bit of an odd assertion to make. The United States experiences a great deal of economic growth after 1945 and post-Korea, US defense spending was a substantial part of the US budget during this period. So military spending doesn't seem to have been an automatic retardant on economic growth.
Secondly, it's a bit misleading to suggest that defense spending isn't being "invested in the economy." A great deal of German and Japanese defense spending during the Cold War went to national firms like H&K or to paying domestically-based soldiers. So a large percentage of dollars taxed to pay for defense went right back into the German and Japanese economies.
Thirdly, just because Japan had Article 9 restrictions on its military didn't mean that it was unarmed. The Japan Self-Defense Force built a modest but robust capability from 1950. And West Germany was on the front lines of the Cold War, so Germans spent huge amounts on their armed forces. West Germany had the largest army of any non-US NATO member.
Fourthly, keep in mind that the United States supplied Japan and Western Europe with substantial amounts of aid and financial assistance through programs like the Marshall Plan.