The baby is due in August and is the first child for the couple, who tied the knot in September of 2008.
"Rob and I are so excited it's stupid," Olson, 34, said in a statement to People. "The last couple years have been pretty amazing for us and just when we thought things couldn't get any better, the greatest little thing in the world happened! We're totally beside ourselves."
The mother-to-be and McElhenney, 32, have both starred on the FX comedy since 2005. McElhenney, who is also the show's creator and executive producer, recently appeared on Lost. Olson co-starred in the 2010 romantic comedy Leap Year.