if an H-1B worker is laid off for any reason, the H-1B program technically does not specify a time allowance or grace period to round up one's affairs irrespective of how long the H-1B worker might have lived in the United States. To round up one's affairs, filing an application to change to another non-immigrant status may therefore become a necessity.
An H-1B worker who is laid off and attempts to find a new H-1B employer to file a petition for him is considered out of status if there is even a one day gap between the last day of employment and the date that the new H-1B petition is filed. While some attorneys claim that there is a grace period of 30 days, 60 days, or sometimes 10 days, that is not true according to the law. In practice, USCIS has accepted H-1B transfer applications even with a gap in employment up to 60 days, but that is by no means guaranteed.
Some of the confusion regarding the "grace period" arose because there is a 10 day grace period for an H-1B worker to depart the United States at the end of his authorized period of stay (does not apply for laid-off workers). This grace period only applies if the worker works until the H-1B expiration date listed on his I-797 approval notice, or I-94 card. 8 CFR 214.2(h)(13)(i)(A).
The employer has the legal obligation to pay for the laid-off worker's return transportation.
Hope it helps