I'm not Korean, so I didn't put my answer down below, but "었었어요" = past perfect tense = it is difficult to just explain so here are some examples:
먹다 - to eat
"In Korea i ate lots of kimchi" = 한국에서 많이 김치를 먹었었어요. Literally it means, when I was in Korea (but now i'm not in Korea) i ate lots of Kimchi.
자다 - To sleep
"I used to sleep alone" = 혼자가 잤었어요. = Literally, i used to sleep alone (but now I'm married, OR now i sleep with my dog - I am no longer sleeping alone because....)
It is like when one action completely stops, and you will not do it again. 잤어요 = I slept = , so 잤어요 = means i slept, but the action may/ or will continue some other time. Kind of like saying in English = I exercised today었다. I exercised on the weekend for the last time.었었다. In English we just add words to modify the sentence, in Korean the verbs are incredibly specific.
I hope this helps, and i apologize for any confusion or errors.