I have same situation before. Strictly, you're illegal right now. According to H1B rule, you must leave US instantly after you got lay-off. But you can talk to boss, let them keep your status even without salary, at same time, try to find a new position. If you can find another position during same department, you even don't need a new H1B.