What is the meaning of [The best advice is found on the pillow]

If we have a problem, we may find the answer after a good night’s sleep.

People also say: “I’ll sleep on it.”