"Comment as-tu dormi ?"
This literally translates to "How did you sleep?".
Here are a few other options:
* "Tu as bien dormi ?" (Did you sleep well?)
* "Ta nuit a été bonne ?" (Was your night good?)
* "Comment t'es-tu réveillé ?" (How did you wake up?)
The best option for you will depend on the context and the level of formality you want to use.