BUT, “how are you?” is almost always a Phatic Expression[0], especially in cases where it could be considered a generic greeting.
Phatic Expressions seem to be more important to some cultures than others. For example, in Australia it’s such a fundamental greeting it often trips people up[2]. In this case the question is not a genuine or sincere inquiry into you current state, but rather a request to acknowledge the presence of each other.
In that sense, “how did you sleep” would be such a curve ball unless among friends I think it would cause secondhand embarrassment.
Tom Scott did a great 3 min video[1] on this exact thing.
[0] https://en.wikipedia.org/wiki/Phatic_expression [1] https://www.youtube.com/watch?v=eGnH0KAXhCw [2] https://www.unilodge.com.au/blog/g-day-mate-a-guide-to-aussi...