I agree with the answers already posted, but let me add a few thoughts.
I recall seeing a TV program not long ago where the narrator said that parents shouldn't dictate sexual morality to their teenage children, but should let them make these decisions for themselves because "then they will own the decision". And I thought, Yes, great, except the consequences of an unintended pregnancy are very large and last for 18+ years. Would you say of a 5 year old, "I'm not going to tell him not to play in the middle of a busy street. Let him make that decision for himself so that then he'll own it." No, I would not do that, because if the child decides that playing in the street sounds like fun and then he gets hit by a truck, he could be crippled for life. The danger is too great.
I believe the guiding principle is this: A newborn child is totally incapable of making decisions for himself. By the time he is 18 or so, he should be 100% capable of making his own decisions. So you have to get him from point A to point B fairly smoothly. Some parents err on the side of being too controlling, of giving their child too little freedom to make his own decisions and his own mistakes, so yes, you keep the child safe, but then when he grows up and moves out of the house he has no idea how to run his own life, and he makes huge mistakes. Other parents let their children make their own decisions too soon and the child does himself serious harm.
For example, suppose that as your child is growing up you never let him decide for himself when to share his toys and when not to. You always tell him exactly when he must share and with whom. Then the child grows up and moves out. For the first time in his life he can tell other people "no, you can't have this". He gets carried away with this new power and is extremely selfish. Then he gets married. It's easy to see a disaster looming. Or maybe he goes to the other extreme and is too willing to share. Then he tries to make it on his own but is always loaning other people money that he can't afford to be without, let's a neighbor borrow his car and now he has no way to get to work, lets casual friends stay in his apartment and they trash the place, etc. If you always tell him when to share his toys and when not to, then he may never learn the logic behind the decisions. He just knows, "mom and dad said so". But if he can make these decisions for himself, then he will gradually figure out, If I never share, then it's hard to keep friends, but if I share too freely and/or with the wrong people, they break or steal all my toys.
On the other hand, like the examples I used to start this post, sometimes the consequences are just too severe for the child to be trusted to make this decision himself. I did not let my children decide whether or not to play on the street when they were 3 years old, because they did not have the sophistication to distinguish between a street that was too busy to play on and one that was reasonably safe. I did not let my children decide whether or not to go to school when they were 10 years old, because the consequences of not getting a good education were too serious. Etc.
In your example of staying up late, I'd say no, I would tell the child he has to go to bed. As Dariusz says, from the child's point of view, getting to stay up late and watch TV are big plusses. Falling asleep in class? So what? The REAL consequence here is that he will not learn as much as he could have. So say the child sleeps through a math class and fails to learn how to calculate interest rates. 15 years later when he buys his first house or his first car he can't figure out what this is really costing him and he gets cheated or makes a poor decision. Then he says, Wow, I should have paid attention in math class. But it's way too late. The consequence is so far removed from the decision that very, very few children will anticipate it.
So you have to decide how much freedom to give your child on a case by case basis, considering the maturity of the child and the consequences of a bad decision. Your goal should be to go from 0% freedom for a newborn to 100% freedom for an 18-year-old, on a relatively smooth curve.