"It was brutal; it's not for everyone," the 31-year-old told online fashion retailer Net-a-Porter's digital magazine.
"I wore a double corset day and night for three months. It was sweaty, but worth it," she said.
The couple have two daughters, Honor Marie Warren, age 4, and Haven Garner Warren, 1.
Alba mentioned nothing in the article about any health issues tied to wearing the corsets. Doctors warn wearing them for long periods can lead to health concerns.
The actress, who got her start in 1994 at age 13 in the Disney Hollywood Pictures film "Camp Nowhere" and the Nickelodeon TV series "The Secret World of Alex Mack," spoke to the Net-a-Porter magazine about the film "Sin City: A Dame to Kill For," in which she reprises her "Sin City" role as Nancy Callahan.
"I just finished the best movie I've ever done," she said. "It was so opposite to what I do [at home].
"My approach to acting now is so different -- I'm fearless because I have nothing to lose. Before [having children] my identity was wrapped up in every decision," she said. "Now, I don't care. It could be a pile of [expletive] and you could think it was the worst thing you ever saw, but I still had the best experience."
Celebrity Families of 2014 [PHOTOS]