'Can' indicates ability / capacity.
'Could' is used as the past tense of 'can'.
'Can't' indicates present incapability.
'Couldn't' indicates past incapacity / inability.
Here, the speaker is talking about the past and his/her inability to sleep. Therefore, the correct option is C: couldn't sleep.