Mutual funds brought in $377 billion in assets last year, while exchange-traded funds attracted $104.1 billion and separately managed accounts garnered $80 billion, according to Morningstar’s Fund Flows and Investment Trends 2009 Annual Report.

Money-market funds registered outflows of $392 billion over the same period, the company announced Monday.

“It was a banner year for bond funds in 2009,” said Sonya Morris, an editorial director at Morningstar [MORN]. “It shows investors felt more comfortable stepping back into the market.”

Bond funds accounted for the bulk of mutual-fund inflows, at $357 billion, more than they attracted for the previous five years combined. Weak competition from other income-producing products, such as certificates of deposit and money market funds, explains some of bond funds’ unusual success, but investors’ flight to safety explains much of their appetite for bond funds. Muni funds experienced a similar bump in inflows, bringing in $72 billion, up from their previous high of $21 billion in 2006.

All said, bonds have a better story to tell than equities: Bonds have returned 6.15% over the past 10 years, according to Barclays Capital Aggregate Bond Index, results as of Dec. 31, compared to the S&P 500’s annual loss of 0.95% over the same time period.

Morris urges caution, though. Bond funds had a stellar year, and she said it is unrealistic to expect a repeat of that performance in 2010. Also, the bond rally has made certain sectors less attractively priced, and some—government-backed bonds and munis in particular—could even be considered overheated. “Investors have reason to moderate their expectations in 2010,” she says.

Meanwhile, ETFs enjoyed strong inflows, although 2009’s $104.1 billion was down significantly from 2008’s $156.6 billion in inflows. Product manufacturers responded accordingly, launching 134 new ETFs in 2009 (37 equity ETFs; 33 leveraged and inverse; 30 fixed income; and 24 international equity; plus 10 others). Fifty four ETFs closed last year, down from 58 in 2008.

Generally speaking, fixed-income investments ruled ETFs as they did mutual funds, said John Gabriel, an ETF analyst at Morningstar. However, he said that ETFs representing specific niches also sparked investors’ interest, most notably iShares MSCI Brazil Index ETF, which had $1.7 billion in inflows, and the SPDR Gold Shares ETF, which had $11 billion in net inflows.

Why are product providers lifting rocks so far afield? Partly because the three largest providers - State Street [STT], Vanguard and BlackRock [BLK], have the traditional equity markets covered. However, when investors weren’t looking for safety they were looking for diversification outside of the traditional market and into commodities.

“A lot of people wanted more diversification, which partly explains the proliferation in esoteric asset classes,” Gabriel said.