How long should you swaddle your child?  

Perhaps never! Swaddling may wrap it up in a neat package and it may give the babe a sense of security and such but I am not aware and have never been taughts that one should swaddle their babe. There may be cultural and ethnic practices for this, but medically, none that i know of. If you are happy, the babe is happy and all are happy, then do it as long as one is not happy!
End as soon as works. Swaddling may give a baby a sense of security as if they were still shrink wraped in the womb.They often appear confused or awaken with the normal random movements of the limbs they don't really know are part of them.In that sense swaddeling appears a good transitional stage for some to promote rest. Gradually undoing the wrap allows you to end the process with less fussing.End as soon as works.