But, in a recession, the stock market tends to nose dive, which prompts a lot of people to flee to fixed-income securities because they're viewed as being safer. Which would also drive down yields.
Not always:
https://en.m.wikipedia.org/wiki/United_States_federal_govern...
"Market consequences ... U.S. treasury bonds, which had been the subject of the downgrade, actually rose in price and the dollar gained in value against the Euro and the British pound, indicating a general flight to safe assets amid concerns about a European debt crisis.[31]"
Basically, no one believes rating agencies with respect to the US paying its debts - but they do believe that if the US government is in chaos, it will be bad for the world economy.
One should also remember that US bonds are denominated in US dollars, which the US government can print. Also, if you're comparing to "cash" you probably mean "US dollars" which are backed by the "full faith and credit" of...the US government.
Or is it simply about interest rates, I guess, since higher interest rates cool the market and lower interest rates warm the market. So investors are thinking a recession is coming and the Fed will need to lower interest rates to stimulate.