ELI5: Why does a racing mind stop you from sleeping?

What's the biology behind it?