The main reason that you'd knit leg warmers on circular needles is to avoid having a long seam. With yarn, a seam all the way up the leg could be kind of bulky. Why not use circulars? They'd make the project easier by far.
If you want to experiment with using the straights, you'd have to reverse the order and orientation of the stitches on the "wrong side" rows.
So take row 1 and all the odd-numbered rows as the "right side" and knit them as written. Then on the even-numbered rows, you'd reverse the order of the stitches and change knits to purls and purls to knits.