http://www.nrilinks.com/immigration/visatypes/h4_faq.htm
Q: My wife was here in U.S. on H-4 status. She later applied for a job and got her status changed to H-1B. Now, her employer has laid her off. How long does she retain her H-1B status and when does she revert back to her H-4 status?
A: She only retains her H-1B status while she is working for that employer, so she should immediately file an I-539 to change back to an H-4. She will not automatically revert to H-4 status. When she files her petition to change to H-4, she will be in status while it is pending. If her H-4 stamp is still valid in her passport, the easiest thing to do is to have her travel abroad. When she reenters with an H-4, she'll be in the correct status.