Actually the man page is divided in to sub manuals according to its type(Commands / Library Function/ System call / routines related to kernel )
Refrence from man file
1 Executable programs or shell commands
2 System calls (functions provided by the kernel)
3 Library calls (functions within program libraries)
4 Special files (usually found in /dev)
5 File formats and conventions eg /etc/passwd
6 Games
7 Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7)
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]
so when you type man sleep then it takes man 1 sleep ( As it is a command )
But when you type man 3 sleep then it is going to sub manual 3 which is library function.
For more details u can type man man