How long does it take for leg and arm muscles to atrophy if at bedrest fir pregnancy?

They won't. Even at bedrest, you can perform arm and leg exercises to keep the muscle tone intact.