Using tilly's ascii chart above; my guess is z, assume my guess in between x and y. When I open the envelope to reveal x, which is smaller than z, I will then say that I was handed the smaller number and I will be right. If I open the envelope to reveal y, which is larger than z, I will say it is the larger number and I will be right. If my guess z is smaller than x, I will be wrong when ever I am handed x, and right whenever I am handed y. Similarly if z is larger than y, I will be right whenever I am handed x and wrong when handed y.
Now, if I look at the number in the envelope first, as a human, I am incapable of picking a truly random number not biased by that number. (Hell, humans are incapable of picking a truly random number period). So, I now have a 50-50 shot at deciding to pick higher or lower than that number. Which means 50% chance of deciding whether to say the received envelope number is higher or lower than the number in the other envelope. It no longer matters whether my 'guess' falls between the actual numbers anymore, because I can not receive the other envelope. Therefore, the odds are 50%. Only by choosing a number before the envelope is handed to you can you increase your odds however slightly.