Let's try that again (yeah, diagrams would really help.)
Firstly, we can make the line thingy into one long loop by joining the ends that are sticking out. Well, it doesn't even need to be one long loop, as long as there aren't any ends sticking out. If we do it properly, by joining ends that are next to each other, then we don't create any more crossings.
For example, suppose that we've closed everything and end up with this (simple case for illustrative purposes):

Now we can just split off loops from the outside as so:

Thus we end up with a bunch of closed loops, like so:

Now we fill in all of the closed loops, which we can do by the Jordan Curve theorem:

And stick everything back together. Now we have our coloring.
Now let's look at one of the filled regions, and at one portion of the boundary of that region (lines made red for clarity):

Let's call the three lines the higher line, the middle line, and the lower line (names self-explanatory).
Let's look at the lower intersection. We take each of the lines in that intersection, and draw arrows going along next to the filled region toward that intersection:

Now, for the middle line, the filled region is on the right, and for the lower line, the filled region is on the left. So we put the middle line on top at the crossing:

Now we do that for all of the crossings. Note that when going toward the lower crossing, the middle line has the filled region on the right, but when going toward the higher crossing, it has the filled region on the left. Thus we put it above at the lower crossing, and below at the higher crossing:

Thus we get an alternating over-under pattern.
Now we can just undo the coloring and the extra joinings, and the crossings will still fit the over-under criterion.
(Pictures done really quickly in Photoshop)