It really depends on how much you gained. I've heard lots of women say they lost 20 pound before they left the hospital. So if they only gained 30, I don't think 3 months is unreasonable (for some women).
I gained 75 pounds and lost it w/in four months and gained 90 the second time and lost it w/in six months. And I didn't do anything drastic. (But I had a small jelly roll that wouldn't go away.)