Ride hailing firms Uber (UBER) - Get Report and Lyft (LYFT) - Get Report could find a particularly tough road ahead if a recession hits. 

In a recession, consumer confidence sinks and can remain at depressed levels for a long time -- and that could throw Uber's and Lyft's business models out of whack, lowering demand and damaging their growth stories. Uber shares are down roughly 17% from their IPO price in May, while Lyft shares are down about 25% from their IPO price at the end of March. 

The University of Michigan's Index of Consumer Sentiment, which surveys consumers quarterly on their willingness to spend, suggests that after the 2008 recession, it took about four years for sentiment to return to pre-recession levels. We may not know how severe any future recession would be, but in the event of a downturn, discretionary ride hailing trips could sink across the board.

"Most rides to bars and restaurants are discretionary. People can easily save money by visiting bars and eating out less often, and that means fewer rides," said Erik Gordon, professor at University of Michigan's Ross School of Business. "Leisure travel also is discretionary, so people might fly less and need fewer rides to and from airports. Even business travel is partly discretionary. You have to do some of it, but in downturns travel budgets get cut."

Food delivery options such as Uber Eats-- Uber's fastest-growing business segment by revenue -- is also likely to take a hit if more consumers shy away from the convenience and opt to eat more cheaply in a downturn. That could throw another wrench into Uber's growth narrative; last quarter, Uber's ride-hailing revenues grew just 2% year-over-year, while Uber Eats, its food-delivery business, saw revenues rise 72%.

In their S-1- filings, Both Uber and Lyft identified economic downturns as a potential risk factor for their businesses. But part of what sets the two apart from other consumer-facing services is that they are also two-sided markets that both sell rides and hire drivers. And that adds another layer of complexity to a recession scenario, added Kalinda Ukanwa, a professor of marketing at University of Southern California. 

"You have all these people out of work, so they're turning to alternative forms of employment. I think we're going to see an increase in drivers," she said, which could lead to a problematic imbalance between supply and demand. "Overall, I think it's going to have a negative hit on companies like Uber and Lyft: There's going to be an oversupply of drivers, less discretionary income as riders, and less demand for those services."

Too many drivers could compel Uber or Lyft to limit the supply of new drivers -- but such an action could potentially hamper other ways these companies make money, such as Lyft's growing car leasing program, called Express Drive.

Assuming a downturn would mean lower demand, Uber, Lyft and other "sharing economy" services like food delivery apps could be faced with some tough choices on how best to weather choppy economic waters.

In recent months, both Uber and Lyft have steered away from offering heavy promotions and incentives to attract and retain riders, and are embracing more "rational" pricing on the idea that the market is stabilizing. But to keep riders coming back in a downturn, they might have to lower prices or use other promotional tactics to keep the growth narrative moving in the right direction.

"If the growth stops, the game is over," Gordon said. "As long as they can show growth, they can claim that they eventually will produce profits."

On a recent earnings call, Uber's CEO Dara Khosrowshahi dismissed doubts about its profitability prospects as a "meme," telling investors that "a business at scale the way we are a global business at scale, but has network effects with a 20-plus percent take rate -- I believe we have the potential and if we execute should turn out to be a spectacular business long-term."

But with shares down about 18% since Uber's Aug. 8 earnings report, which revealed a substantial miss on both revenue and earnings, investors don't appear all that persuaded by Uber's "growth first, profits later" tack, at least for now. 

"The last thing they need is a downturn that reduces their volume by even small amounts," Gordon added. 

Beyond just Lyft and Uber, a downturn could have the effect of separating winners and losers in the broader "sharing economy" -- a category that includes not just ride hailing, but delivery services such as DoorDash, GrubHub (GRUB) - Get Report  and Postmates, as well as Airbnb and others. 

"It will be interesting to see if even Lyft survives," Ukanwa added. "The other implication is that as a result of stress testing, [a downturn] can eliminate a lot of competition in the air." 

Save 57% With Our Labor Day Sale. Join Jim Cramer's Action Alerts PLUS investment club to become a smarter investor! Click here to sign up!