Formal:
* J'ai bien dormi. (This is the most direct and literal translation)
* J'ai dormi d'un sommeil profond. (This emphasizes the depth of sleep)
Informal:
* J'ai bien dormi ! (This is a more colloquial way to say it)
* J'ai fait un bon dodo. (This is a more playful and informal way to say it)
More descriptive:
* J'ai passé une bonne nuit de sommeil. (This emphasizes the quality of the sleep)
* J'ai dormi comme un bébé. (This means "I slept like a baby" and is a common idiom)
You can also use "Je me suis bien reposé(e)" (I rested well) if you want to emphasize the feeling of being rested rather than just the act of sleeping.
The best way to say it depends on the context and your level of familiarity with the person you are speaking to.