Big American banks have been taking it on the chin for nearly five years now, and understandably so. Post-crash, they've spent most of their time repairing broken balance sheets, dealing with scandal after scandal, and finding new ways to make money that comply with a raft of new domestic and international regulation.

And while banks have been complaining loudly about that new regulation, ironically, it may just be the U.S. government (once again) that comes to their rescue. And it's all thanks to a little government program called QE3.

A quantum of quantitative easing
QE3, short for "quantitative easing, round three," will involve the Federal Reserve buying medium-to-long-term securities in the hope of driving down interest rates, spurring people and businesses to borrow and spend more, and thus boost the economy. QE3 in particular is the Fed's plan to buy $40 billion of mortgage-backed securities every month.

One of the things that makes this round of QE so different from the previous two rounds is the duration, which, theoretically, is endless. Fed Chairman Ben Bernanke has committed to buying mortgage-back securities until, as he himself put it, the labor market improves "substantially." So for this round, stopping QE is a pure judgment call on the part of he and his fellow Fed governors.

QE3 can be looked at, then, as an open-ended commitment to print money. Inflation fears aside (which aren't unreasonable), QE3 could be a real boon for banks as well as for their investors. Here's how.

That old black housing-market magic
In purchasing mortgage-backed securities, a change from previous rounds of QE, the Fed is specifically trying to boost the housing market. Why? Housing, plus the services that go along with it, have historically accounted for about 17%-18% of gross domestic product. When the housing bubble burst in 2006-2007, it took a lot of America's economic growth with it.

Who lends to homebuyers? Banks do, and big banks, as you might expect, do the bulk of the mortgage lending in the U.S. Here are the top four, ranked from largest to smallest in terms of percentage of the U.S. mortgage market as reported in the first quarter of 2012:

  1. Wells Fargo (NYSE: WFC), with 33.9%.
  2. JPMorgan Chase (NYSE: JPM), with 10.9%.
  3. US Bancorp (NYSE: USB), with 5.2%.
  4. Bank of America (NYSE: BAC), with 4.5%.

With the Fed snapping up $40 billion worth of mortgage-backed securities each month, demand for them will increase, and demand for mortgages to fill them will follow. Banks, like the four above, will step in to fill this demand by lending more to homebuyers. The more banks lend, the more money they make, which should make them more valuable as investments. Good news for investors in the big four.

But maybe the best part of all this is, the banks will be coming by the new money honestly. Banks were built to make loans: to extend credit to businesses and consumers. So long as credit standards for borrowers remain strict, and the temptation to reach back into the subprime market (which helped blow up the world economy four years ago this month) is resisted, loaning money to homebuyers is worlds safer than making bets in the derivatives markets.

Buckle up and enjoy the ride
It helps, of course, that we're already seeing the merest hints of a U.S. housing recovery. So QE3 is shaping up to be good for the economy overall, but specifically, QE3 is also good for bank investors. It could be the start of something substantial for them: a return to real share-price appreciation and healthy dividends. It's also good for the banking system: Banks making money from lending money to credit-worthy borrowers is a long way from $100 billion bets gone wrong in the derivatives markets (see: JPMorgan's London Whale trading debacle).

And with the open-ended commitment from the Fed to continue buying mortgage-backed securities, the sky's the limit. We won't torture ourselves for the moment about the real threat of inflation: There's nothing we can do about it anyway. Might as well jump on the QE3 bandwagon and enjoy the ride.

So buckle up, Fools. Things are about to get interesting. And while you're waiting around for the QE3 booster rockets to kick in, take an even closer look at the most-talked-about bank out there with our in-depth company report on Bank of America. The report details Bank of America's prospects, including three reasons to buy and three reasons to sell. Just click here to get access.