One idea would be to use small socks and cut them to fit the baby's legs. Or you can knit them yourself. You could also use the sleeves from an old sweater.
Knitting on circular needles will produce seamless and strong leg warmers. Choose a light to midweight cotton yarn and a #4-6 size needle. Even a beginner can knit around and around to make
a tube. Knit/purl the beginning and end to make expandable cuffs.
The best idea that I used was to get a small little girls sweater and cut the arms out of it and fold them over the the top and bottom. They are very cute and they work wonderfully!!
Purchase a pair of tube socks with the tube a little longer than the babies legs but small enough around to fit snug. Next, cut the foot part off of the socks and stitch the ends so they won't fray.
I think a really good idea would be to take old socks, possibly even like soccer socks, and cut the feet off. You could then sew them to keep from fraying and voila...baby leg warmers!