I recently asked this question about how to scan someone's memories while sleeping. The consensus of the answers was that the best way to do this was to not have them be asleep but instead wake them up, interrogate them, and wipe their memory.
This leads me to the question of what happens if someone casts detect thoughts on a sleeping creature. The spell description states (emphasis mine):
[...] You initially learn the surface thoughts of the creature - what is most on its mind in that moment. As an action, you can either shift your attention to another creature's thoughts or attempt to probe deeper into the same creature's mind. If you probe deeper, the target must make a Wisdom saving throw. If it fails, you gain Insight into its reasoning (if any), its emotional state, and something that looms large in its mind (such as something it worries over, loves, or hates). [...] [T]he target knows that you are probing into its mind[...]
For the "surface thoughts", I would imagine that this is related to whatever dream the target is having, or no surface thoughts if in deep sleep. If probing deeper, does the sleeping target still get to make the Wisdom saving throw, and do they wake up on either success or failure?