Shares of Whole Foods Market jumped nearly 10 percent on Monday after activist investor Jana Partners took a nearly 9 percent stake in the company and suggested it should consider putting itself up for sale.

Jana is attempting to engage with Whole Foods CEO John Mackey, sources told CNBC, although the firm has yet to speak about its ideas with the grocer's management.

In a regulatory filing Monday, Jana said it believes Whole Foods "shares are undervalued and represent an attractive investment opportunity." The investor group also said it has "substantial experience" in the grocery and food sectors and intends to have discussions with the current board and management about making changes.

"Whole Foods Market welcomes investment in the company and is open to the views and opinions of all of our shareholders," Whole Foods spokeswoman Brooke Buchanan responded, in a statement late Monday. "We value constructive dialogue toward our shared goals of creating shareholder value, successfully executing on our strategic priorities and taking actions that will position the company for continued success."

Buchanan added that the retailer remains "committed to driving value for all Whole Foods Market shareholders and will continue to act to achieve this important objective."

Whole Foods, a Texas-based chain, has been struggling as other grocers make inroads into its natural and organics foods business. The company also has faced deceleration in customer counts and average purchase amounts. Both trends — combined with overall food price deflation — have contributed to Whole Foods slashing forecasts and posting same-store sales declines for the past six straight quarters.

"Whole Foods business has been deteriorating for several years now," said AjayJain, an analyst who covers Whole Foods for Pivotal Research. He pointed out that same-store sales have been negative for at least two years now and adds "there has not been any stabilization in fundamentals recently."

The Pivotal analyst said the "most worrisome metric" is the company's customer traffic slowing and he believes Jana might be "underestimating how difficult it's going to be to turn the business around. They've been impacted by competitive store openings from 'me too' food retailers like Sprouts that are similarly positioned and even Trader Joe's."

In a research note Monday, CFRA analyst Jim Corridore said he sees an "increased likelihood management will explore a sale of the company." Moreover, he expects the presence of the activist investor might result in Whole Foods management taking "more aggressive actions" to defend its market share position.

"We believe competition will remain intense as traditional and non-traditional grocers are increasing shelf space in WFM's core natural and organic category offerings," the CFRA analyst said.

Indeed, competition for Whole Foods has come from conventional supermarkets such as Wal-Mart Stores as well as smaller chains such as Sprouts Farmers Market, which has focused on a strategy of lower pricing. One way Whole Foods has responded to the threat is by launching a value-based smaller-store format known as 365.

According to Jana, it is looking to first address the retailer's "chronic underperformance" and secondly to make changes in the board and senior management. Also, it plans to looks for ways to improve real estate and capital allocation strategies for Whole Foods as well as discuss the small-store format.

Jana, now the second-largest shareholder of the grocery chain, wants to speed up a turnaround for the company and consider a possible sale. The activist investor has also lined up a slate of potential members to join Whole Foods' board and plans to fight for changes in corporate governance.

Whole Foods had been attempting to trim its costs by closing nine stores and abandoning a goal to open 1,200-plus stores.

Wells Fargo analyst Zachary Fadem said in a note that there's the potential for Whole Foods management "to optimize 20 percent of its store base via additional store closures or potential conversion to the 365 format."

Analysts also suggest Whole Foods could look to exit the U.K. market where it has a presence.

In its filing, Jana named five co-investors who are working with the hedge fund. Three of those investors — Glenn Murphy, Thomas Dickson, and Meredith Adler — have agreed to be on a slate of dissident director nominees if Jana pursues a proxy fight. The other investors — Diane Dietz and Mark Bittman — are acting as consultants, Jana said.

Murphy is a former Gap CEO, Dickson was once CEO of Harris Teeter Supermarkets (now owned by Kroger), and Adler is a former Barclays equity analyst who sits on the board for Performance Food Group. Dietz was a chief marketing officer at Safeway and Bittman is a noted food writer.

Jana Partners declined comment beyond its regulatory filing.

Back in 2013, Jana targeted supermarket chain Safeway, slowly accumulating a 6 percent stake in the company and leading to the retailer adopting a corporate defense strategy known as a poison pill. Even so, Jana encouraged Safeway to exit certain underperforming markets and sell off non-core assets. Safeway eventually ended up merging in 2014 with rival grocer Albertsons in a $9.1 billion deal, which was led by private equity firm Cerberus Capital.

Similarly, Jana acquired a stake of just over 7 percent in ConAgra Foods, a packaged foods giant, and criticized the company's "persistent underperformance." It pushed management to divest lagging assets and the result was an improved balance sheet and expanded margins due to productivity improvements. Jana continues to own about 4 percent of ConAgra, according to SEC filings through March.

—CNBC's Leslie Picker and Scott Wapner contributed to this report.