Both but as always it depends on context. I didn't sleep well (last night) or I haven't slept well (in days).
In the first instance, the time marker forces the verb into the simple past.
In the second, you are describing your present state. Using a time duration (such as 'in days') explains why you look tired now but doesn't force the verb into the past.