The kernel code is in process context in Linux when a user process makes a system call.
The system call code in the kernel will have access to a pointer to the user process.
If the kernel code "sleeps", it is the user process that is blocked. The kernel can schedule another process.
Later (maybe much later) when the condition for sleeping ends the kernel can continue in the context of the first user.