"If I had time, I would sleep."
Translation:Если бы у меня было время, я бы спала.
It's a saying, although a bit rude one. Alex omited a certain word after "был" because otherwise he could have been banned from the forum. "If grandma had a [certain part of male anatomy] she would be a grandpa".
The meaning of the saying is essentially "if things were different, the things would be different, but they are the way they are, so there's no point in guessing what could have been."
You forgot Если бы...
Also, у меня есть is present tense = "If I have time", not "if I had time" = у меня было.
Also, поспал is imperfective, and the sentence seems to be focused on sleeping as one event, requiring perfective. But we won't know if Duo would accept that until you correct the other errors.