Stanford Professor James Fearon explains his latest research (and here's a more readable version of the above graph):

The black line is the average across countries of military spending as a percentage of GDP, using the Correlates of War (COW) estimate of total spending divided by World Bank GDP figures (which only start in 1960).  The red line is the average across countries of armed forces per 1,000 population, again using COW estimates.

You see really striking long-run declines in the West, Eastern Europe and the former Soviet Union, and Asia.  In these areas it almost looks as if demobilization from World War II has taken place gradually and over 60+ years.  In Latin America and North Africa/Middle East,  you see pretty striking declines since the end of the Cold War, and perhaps some decline in subSaharan Africa since around 2000.

Why the decline? Fearon speculates that democratisation has a lot to do with it, but not in the way you might think. He argues that democracies have smaller militaries because they worry less about internal threats. Kindred Winecoff from the University of North Carolina doesn't buy that explanation:

We do not know for certain why the world is so peaceful, but quite a lot of IR theory suggests that American hegemony (which Fearon does not mention) and nuclear weapons (which he does) may have something to do with it. Regarding the former, the American security umbrella covers other democracies and (sometimes) extends to countries transitioning to democracy -- the pacification and democratization of Europe since 1945 is obviously the most pronounced example -- so that could help explain the domestic patterns without telling an ad hoc story about democracies being worried about coup threats (which strikes me as being ahistorical and is in contradiction to the best evidence).