The correct answer is: C. didn't sleep
The bed was very uncomfortable. This means that the speaker did not sleep well. The past tense of the verb "sleep" is "slept." Therefore, the correct answer is "didn't sleep."
The other options are incorrect because they do not agree with the tense of the sentence. Option A, "haven't slept," is in the present perfect tense. Option B, "am not sleeping," is in the present progressive tense. Option D, "was not sleeping," is in the past progressive tense.
The past tense is used to talk about things that happened in the past. In this case, the speaker is talking about something that happened in the past, namely, that they did not sleep well because the bed was very uncomfortable.