In life all events can be valuated with specific "value functions". The value function determines the value of a certain experience or an object (depending on your evaluation) and the input to the function is your initial investment  (usually money, time, work).

For the majority of things in life, the value function is never proportional meaning that just because you put in more time, money or effort does not mean that you will get a greater return. At some point, the rate of return that you get back starts decreasing and this is the Law of Diminishing Returns.
Below are examples of different value functions:

Diminishing Returns

Happiness vs Time

Going on a night out and realising that spending 2 more hours would give me no more happiness than leaving right now.

Happiness vs Money

Getting a cheaper brand of chocolate would make me no less happier than a more expensive one.

Peformance vs Time

Spending a lot of time working does not mean you will necessarily score higher in the exam.

However not all value functions have to be diminishing.

Non-Diminishing Returns

Learning vs Time

Learning to swim, ride a bicycle or do a backflip can be very difficult at the start but once you put more time you manage to learn very quickly.

Earning vs Time

Generally for the majority of people, the amount you earn is proportional to the amount of time you spend doing the work while a small minority of the population may earn exponetially to the amount of time they put in.

Offsets

Some people may already have an offset value. This could be either a positive or a negative offset value. For example a person who already has previous knowledge but learns more quickly already has a higher return with no input. Some people may be happy in general in which case staying longer at a party makes no difference to them.

Gradients

Some people may be faster learners or enjoy an activity more than another person. This means they can get more value out of a situation than the general population.

Summary

If spending more time working is not improving your performance, it is firstly best to change your strategy but also recognise the value of your performance for you. If you are not gaining anything by staying longer at a party, it is best value to improve your health by getting more sleep. In general, everyone values things differently but it is always important to remember the principles that define you. Learn to extract value out of situations that may have no apparent value at all. Adapt your value functions if required but most importantly always remember them.
Also note that the above value functions are very simplistic. In real life, there may be multiple investments (time, health and money) and multiple returns (happiness, opportunities, pleasure, money) and it is always important to remember that.