You should not leave any shampoo in your hair overnight because when shampoo is left in your hair and not rinsed out it can cause damage to your hair and cause your to dry out and crack and split.
Always fully wash and rinse out the shampoo in your hair when showering to prevent dry cracked and damaged hair.
There's no reason to leave any shampoo in your hair and all it will do is cause damage to your hair so always rinse it out all the way.