"Oh my God, when Kylie Jenner posted about Casper I think it broke our website," says Neil Parikh, one of Caspers co-founders, about Jenner's March 2015 Instagram post, which garnered more than 870,000 likes.

Casper is the online mattress startup that launched in 2014 and quickly became a social media phenomenon, with celebrities like Kylie Jenner showing off pictures of their new mattresses on Instagram and YouTube influencers posting "unboxing" videos where they excitedly pull a new Casper mattress out of a cardboard box after it arrived on their doorsteps.

"At the beginning, we met with dozens of investors who all said, 'No one is ever going to buy a mattress online. This is a dumb idea, don't do it,'" Parikh, who is now Casper's chief strategy officer, tells CNBC Make It .

But, before Casper launched five years ago, the company's five co-founders struggled to convince investors that an online mattress startup could be the next big idea.

Today, Casper is a billion-dollar mattress company leading the charge of online retailers disrupting an industry previously dominated by companies selling mattresses out of large warehouses. Casper's sales keep growing year-to-year and the company is even rumored to be getting ready to launch an IPO (though Casper CEO Philip Krim has declined to confirm).

Without any significant outside investments, Casper's founders first had to put up their own money and when that ran out use their own credit cards to pay for the most basic start-up costs, including manufacturing the first sample mattresses and paying to ship them to prospective investors.

"We were just, like, racking up debt. We put, like $50,000 to $100,000 on our credit cards, which probably was irresponsible. But, we were all in," Parikh tells CNBC Make It.

Casper's founders finally won over a group of venture capital investors who believed in the idea enough to give them $1.85 million in seed funding to get the idea off the ground in January 2014. The company officially launched in April 2014 and, even to the surprise of its founders, Casper sold out its entire inventory of mattresses (which, at the time, was still just 40 beds) on the first day the company's website went live.

The founders then had to scramble to fulfill those early orders. They waited for a truck full of Casper mattresses to travel from Casper's manufacturer, in Georgia, to their headquarters in New York City so they could quickly package them and ship them to customers.

"We'd sold through, like, all of our inventory, and so when the truck got there we literally took the boxes out, put them on the cobblestone streets, relabeled them all and shipped them back out," Parikh tells CNBC Make It. "We set up a warehouse in the middle of the street, and it was chaos but it was awesome."

Parikh and the other Casper founders had expected to sell about $1.8 million worth of mattresses in their first year, but instead they hit that number in just two months. That early success helped attract more money from big-name investors — including celebrities like actors Leonardo DiCaprio and Ashton Kutcher and rappers Nas and 50 Cent — which, in turn, helped spread word about the brand.

In 2017, retail giant Target reportedly looked into buying Casper for $1 billion, but instead invested a reported $75 million in the company and started selling Casper products in its stores. Since launching, Casper has raised nearly $340 million from investors, and the company is currently valued at $1.1 billion, Casper said last month.

In 2018, Casper topped $400 million in annual revenue, the company says. That number is likely to continue growing in 2019, which could also be the first year that Casper reaches profitability (according to leaked financials recently reported by The Information), as the costs of growing the startup have reportedly outweighed its increasing revenue streams.

Meanwhile, Casper's success has helped spawn a king-sized list of rivals, who are looking to follow the path Casper blazed selling affordable, quality mattresses online. Now, Casper has to compete with other well-funded start-ups with similar models, like Leesa Sleep (which has raised more than $30 million from investors like Seventh Generation CEO John Replogle and TOMS shoes founder Blake Mycoskie) and Purple Innovation (which is publicly traded with a market value of over $250 million), as well as fellow direct-to-consumer brands like Tuft & Needle (which Serta Simmons acquired last year) and Eight Sleep (which uses hidden sensors to track your sleep cycles).

And, while the rise of online mattress-sellers has hurt traditional retailers (Mattress Firm, the largest US mattress retailer, filed for bankruptcy in October), it has also inspired other large retailers to dip their toes into the industry. Last year, retail giant Walmart joined the fray by launching its own online-only mattress and bedding brand, called Allswell, while Amazon (which sells Casper products on its site) quietly entered the mattress market last fall by selling memory foam mattresses from its AmazonBasics and Rivet brands. (The higher-end Rivet mattresses even come with a free 100-night trial and cost from $449 to over $620.)

The growing list of competitors obviously presents a major threat to Casper's run of success. But Casper isn't sleeping on its competition, as the company continues to expand into new product areas (along with mattresses, Casper now sells pillows, sheets, dog mattresses and, most recently, an $89 bedside light called the Casper Glow lamp).