Boom and Bust
Unfortunately, the way foundations are set up and regulated, our funding tends to be pro-cyclical. What do I mean by that? When the economy (especially the stock market) is up, we have more money to award. When the economy is down, we have less. Both cases intensify the underlying economic cycle. By awarding more when there is more money to be had, we help heat up the economy; by awarding less when there is less money to be had, we intensify the economic contraction.
How did we get here? Most foundations are required to pay out at least 5% of their assets annually. The assets are calculated at year-end based on either a 36- or 12-month average (depending on what kind of foundation is involved). Foundations can pay out more than that amount, but not less. More on why they usually don't later.
I'm sure the policy was intended to set a standard for minimum permissible payout so that foundations would not hoard their assets, instead using them to accomplish good. Good idea. But there are unintended consequences.
More money in good times means that when nonprofit organizations are being (relatively) well paid from many sources, they tend to expand, including new start-ups. It seems easier to start a new program, raise salaries, add staff, and decide to grow. When the bad times roll around, however, the economic contraction can be more painful in nonprofits, because everything dries up at once. Donations, grants, government payments (especially the state), and earned revenue all shrink at once. Bad debt and charity care go up.
Complicating this, it is not unusual in good times (for example, during the dot.com bubble) for there to be calls to increase foundations' minimum payout requirement to 6 or 7%. But the last 10 years have been an illustration of why this might not work.
Foundations are subject to many of the same economic forces as other nonprofits. In hard times, the value of our assets declines, and the 5% payout actually becomes a smaller amount of money. If the foundation sells devalued assets to keep the payout amount higher, it won't get a good price for its assets. Selling them cheap locks in losses and the assets aren't there to benefit from the eventual recovery. This means that the amount and the inflation-adjusted value of our assets (and therefore the grantmaking) will go down.
Some foundations decide to spend themselves out of existence, either by setting a target time to finish spending their assets or by choosing a payout that is too high to sustain them. This is a strategic decision, as is the alternative--to try to be around for the long haul. If a foundation is committed for the long haul, spending when the economy is poor is a real ethical dilemma. Should we trade our ability to help in the future for immediate help now?

is for the long haul; then they must manage and plan for
the cyclical nature (stock market) and build up a reserve
fund that will allow for sustainment of the strategic
programs. However, occasionly there will an economic
tsunami (recession/depression?) that will test the purpose
and mission of the foundation. With strategic planning
one can often make a greater (positive) impact on society
when the economy is down. Plan for the long view!