"I need to go to sleep at nine" was not accepted. Maybe there is some reason why this is wrong but I thought "спать" translated more directly as "sleep" than "bed".
I think it should be accepted. "Go to bed" means the same than "go to sleep", and in this case it literally correlates to спать.
"I need to lie down to sleep at nine."
Again, I may be translating too literally...
One can go to bed without going to sleep, so I can see why they've may have marked it wrong for those who added sleeping to the mix.
You can also use "нужно" with verbs, but "надо" is exclusively paired with verbs.
"Лечь спать" is just to go to bed. "Лечь поспать" has a slightly different meaning. I'd say it's like english "to take a nap" and conveys the meaning of being asleep for a while.
So does я иду в кровать just mean "I go towards the bed" with no meaning of getting into it and sleeping? Is that why лечь спать is used?
Basically. In English, when you say “go to bed”, it definitely implies that you are going to get into a bed (or really any other sleeping vessel, haha) and go to sleep for a while. In Russian, I don’t believe this is the case. «Иду ко кровати» (which would be the correct translation of “go towards the bed”, I believe) simply doesn’t have the same meaning, whereas «лечь спать» does.