How long should a baby to wear an eye patch to correct a lazy eye?

Depends. This is a question for your pediatric opthamologist. The answer varies depending upon the severity and response to therapy.
Babies usually don't. Usually lazy eye is not treated until toddler or older. Its difficult to asses vision accurately with babies. Length of treatment varies by age and severity of vision. Let your pediatric ophthalmologist guide your child's treatment.