I've seem several articles claiming that sleep is akin to the usual proccess of hard drive defragmentation, however for your brain.

You can find several versions of this claim:

http://time.com/4737596/sleep-brain-creativity/

http://blogs.discovermagazine.com/neuroskeptic/2011/08/21/is-sleep-brain-defragmentation/#.XIg-xbjQ-Uk

http://blogs.discovermagazine.com/crux/2012/05/14/is-the-purpose-of-sleep-to-let-our-brains-defragment-like-a-hard-drive/#.XIg-_7jQ-Uk

https://arstechnica.com/civis/viewtopic.php?f=23&t=1055478

http://handsoffmybrain.com/2018/09/defrag-your-brain-with-sleep-but-what-do-you-do-if-you-cant-sleep

https://www.thindifference.com/2016/09/importance-daily-defrag/


Is there any true on this?