Hi, these are my understanding:
(1)Did you sleep well?
a)あなたはよく寝ましたか?(Anata wa yoku nemashita ka?)
This is the literal translation. 寝ました is the past tense of the present tense 寝ます.
b)あなたはよく寝"れ"ましたか?(Anata wa yoku nere/nemure mashita ka?) *"nemure" is politer than "nere".
This is the free translation. And this is more often used than a). This means "Could you sleep well?" literally and asks the "possibility" of goodness of past sleeping.
(2)Do you sleep well?
a)あなたはよく寝ますか?(Anata wa yoku nemasu ka?)
This is the literal translation. But this can be easily misunderstood to be the question "Do you often sleep?". Because よく has the meaning of "often" as well as "well" and its meaning is judged by situations. So this sentence is not used much.
b)あなたはよく寝"れ"ますか?(Anata wa yoku nere/nemure masu ka?) *"nemure" is politer than "nere".
This is the free translation. This means "Can you sleep well?" literally and asks the "ability" of sleeping. I recommend you to use this b). I think that Japanese people often take sleeping as some ability or possibility instead of some act made actively like in English expression.
cf)Do you go to sleep well/easily?
=あなたは寝つきがよいですか?
寝つき means the easiness to go to sleep.
Please forgive me if my English is poor..