Arthur Schopenhauer said this quote

What keeps all living things busy and in motion is the striving to exist. But when existence is secured, they do not know what to do: that is why the second thing that sets them in motion is a striving to get rid of the burden of existence, not to feel it any longer, 'to kill time', i.e. to escape boredom.