Yes goats need sleep just like us humans do and goats will sleep at night even though some people think they do not.
I've seen goats sleep but sometimes goats will find a place to hide before they go to sleep so you may not see them asleep but the goats do sleep at night.
Goats that are domesticated sleep around 5 hours per night and will sometimes take naps throughout the day too.