The bill was passed by the Lok Sabha yesterday, 9 months after the Rajya Sabha approved the measure that will benefit about 1.8 million women.
Mr Modi said the bill ensures better health and well-being of the mother and the child.
"Increase in maternity leave is a welcome provision," Mr Modi added.
"Employment of women is protected thanks to Maternity Benefit Amendment Bill. Mandatory provision of creche in offices is laudable," the Prime Minister said.
The new law will apply to all establishments employing 10 or more people and the entitlement will be for only up to first two children. For third child, the entitlement will be for only 12 weeks.
Employment of women is protected thanks to Maternity Benefit Amendment Bill. Mandatory provision of creche in offices is laudable.- Narendra Modi (@narendramodi) March 10, 2017
The bill also requires every establishment with 50 or more employees to provide creche facilities within a prescribed distance. The woman will be allowed four visits to the creche in a day. This will include her interval for rest.
It has also made a provision under which an employer can permit a woman to work from home, if the nature of work assigned permits her to do so. This option can be availed of, after the period of maternity leave, for a duration that is mutually decided by the employer and the woman.