Amazon has been taking notes on Casper’s success selling beds in a box online. For the first time, Amazon is selling its own mattresses.

Amazon (AMZN) has sold other companies’ mattresses on its website for years, but it launched two of its own in October. A 12-inch full memory foam bed under the AmazonBasics brand goes for $219.99, while a Rivet memory foam full mattress costs $449.

Separately, Amazon debuted Revel this week. It’s an exclusive-branded foam mattress, topper, and pillow made by a third-party.

Amazon positions the Rivet brand as its upscale mattress, and offers a 100-day free trial.

The company wants to capitalize on market trends and it sees an opening in the $16 billion American mattress industry.

The hard part is already done for Amazon: Casper and digital upstarts busted up brick-and-mortar retailers’ grip on mattresses, convincing Americans to buy beds online. Mattress Firm, the country’s largest mattress retailer, filed for bankruptcy earlier this month and may close up to 700 stores around the country.

Walmart (WMT) debuted its own premium mattress under its Allswell digital home brand earlier this year. Target (TGT) recognized the opportunity even earlier, investing in Casper a year ago.

“Mattresses are an ideal category for Amazon to private label,” said Cooper Smith, head of Amazon research at the consulting firm Gartner L2. “Brands like Casper and Tuft & Needle have already validated digital as a growing sales channel.”

Amazon isn’t attempting to overtake Casper. The company turns to its own brands to widen selection on the website.

But Amazon is undercutting competitors on price. It could nab shoppers who want to buy a premium mattress online but don’t want to pay $895 for a Casper full bed or $899 for a Purple mattress on Amazon.

“Amazon private label tends to target a very specific white space in pricing,” Smith said. “Mattresses have some of the highest margins in retail, giving Amazon a lot of room to work with.”

There are early signs of success: The Rivet mattress has already earned 4.7 stars out of five on Amazon ratings, boosting its ranking in mattress search pages on the website.

Amazon may be on solid footing with Rivet because the company has insight into Casper, Tuft & Needle, and Purple customers’ shopping patterns on the site. It has combed through Amazon ratings and reviews to learn rival products’ flaws and what prices can sway customers.

Mattress sales are growing on Amazon, according to e-commerce research firm Edge by Ascential. The new mattresses were first spotted by TJI Research, which analyzes the rapid growth of Amazon’s own products.

Amazon keeps its in-house brand collection under tight wraps, but TJI Reearch has found 130 private-label brands and 191 exclusive brands on the website in clothing, food, household products, furniture and electronics.

Analysts say Amazon has accelerated its brand push lately to gain higher profit margins on sales, build customer loyalty, and put pressure on third-party manufactures that sell on its site.

Having its own brands could give Amazon more leverage over manufacturers to bring down prices, or force them to pony up advertising dollars on the website to promote their products.