Another way to say "sleeping at night is for getting rest" is "The reason to sleep at night is to rest"