I appreciate your query, the crux of which is:
"...But what extent of sleeping will be considered."
The "extent" has to be judged in the proper context.
For example, consider these situations:
1. A very senior officer like a VP or a Director, who often has to travel at short notice and is on tour during most of the after-office hours and on holidays, takes a few minutes nap in his cabin after lunch.
2. Workers in the continuous process industry, who have to go to the designated Rest Rooms after every two hours due to the extreme working conditions, snooze during their rest-break.
3. Canteen workers taking "rest" in the canteen after the lunch-time is over.
4. An operator in the air-conditioned Control Room, having displays and control units for all vital manufacturing processes, sleeping at his desk.
5. A crane operator falling asleep on his seat while production activities are taking place all around him.
6. A security personnel sleeping during his night shift.
I agree with Bhaskar's opinion on the differentiation between "sleeping on duty" and "taking rest."
Apart from the context, one has to examine the consequences of the apparent dereliction of duties by the concerned employees.
In the last three examples, serious punitive action needs to be taken, as the consequences of this lapse or misconduct can be disastrous to both material and life.
Thus, the "extent" will depend on all these factors and not just on the gravity, depth, and involvement in the act of "sleeping."
Warm regards.