Facebook and Apple are telling their female employees: We will pay to freeze your eggs.

Facebook (FB) is already covering the procedure as part of its insurance benefits, the company said. Apple (AAPL) plans to offer coverage starting in January, according to report by NBC News.

The relatively new practice of freezing eggs allows women to put their fertility on hold so they can still have children later in life.

It's an unusual "perk" and the technology giants appear to be the first major employers to offer such coverage for non-medical reasons.

Egg freezing allows women to focus on advancing their careers during peak childbearing years without sacrificing their fertility.

But some critics argue that companies are encouraging women to put work ahead of motherhood.

Related: Microsoft CEO to women: Not asking for a raise is 'good karma'

The cost of freezing eggs typically adds up to at least $10,000 for each round of treatment, plus $500 or more annually for storage, according to NBC News. Doctors often recommend women freeze at least 20 eggs, which can require two rounds of the procedure.

Facebook, which introduced the benefit in January, covers all eligible fertility treatments up to a maximum of $20,000.

While using frozen eggs does not always result in pregnancy, success rates have been improving.

NBC says fertility doctors have reported a "surge" in demand for egg freezing since the American Society of Reproductive Medicine lifted the "experimental" label from the procedure in 2012.

"Over last several years its become very popular," said Dr. Elizabeth Fino, a professor at the NYU Langone Fertility Center. She said about a third of the patients at her clinic are doing "fertility preservation."

While the success rate varies greatly with age, Fino said the probability of a batch of frozen eggs, or a cycle, resulting in a pregnancy is 40 to 50% for women under 35.

Fertility experts don't advocate delaying pregnancy unnecessarily, but Fino said many women are now postponing pregnancy for career reasons or because they haven't found a partner, and egg freezing is a safe and effective way for them to still have children.

Related: 5 questions on egg freezing

Fertility doctors say the best time for a woman to freeze her eggs is when she is in her 20s and 30s. Younger eggs have a better chance of withstanding the freezing process and increase the chances of creating a baby.

Egg freezing is seen as an elective procedure and is not covered by most insurance policies. However, it has long been covered for women who undergo some sort of medical procedure that causes them to become infertile, such as some forms of chemotherapy.

Related: Apple: mostly men, mostly white

The new benefit comes as many big technology firms have been taking steps to increase diversity among the male-dominated ranks of Silicon Valley.

Apple released statistics last month showing that 70% of the company's 98,000 worldwide employees are male. The figure jumps to 72% for leadership roles and 80% for technical positions.

Facebook's chief operating officer, Sheryl Sandberg, is a leading voice exhorting women to take a leading role in the workforce. But the company's diversity statistics are a reflection of the rest of Silicon Valley. Nearly 70% of Facebook's global staffers are male. A full 85% of the company's tech workers, and 77% of its management team, are also men.

Apple did not immediately responded to requests for confirmation.