I used to always have my tape unravel on me, an I was told by someone I raced with that if I wrapped in the other direction it would not unwrap. I was wrapping top-down, because it seemed to be neater and intuitively correct. But then I started wrapping bottom-up and finishinf with a peice of electrical tape
or twine and now the tape stays on so long I have trouble taking it off.
Also, I believe when you start wrapping at the end of the bar, you should be going inward (toward the centre of the bike) over the top of the bar, and when you get to the top you should be wrapping backwards (towards the rear of the bike) when going over the top. The theory is that the normal hand motions while riding will tighten the tape instead of loosen it.
Perhaps either one of these methods is actually the solution to the problem and both are not necessary, but I have not tried to use only one. Perhaps wrapping tighter is the solution, but I used to wrap what I thought was tight and it unravelled, but others have obviously had different experience with this.