During sleep, especially deep and REM stages, the brain replays and stabilises the day’s learning, moving it into long-term storage. Skimp on sleep and that consolidation suffers.
Sleeping after studying improves retention. No supplement substitutes for this nightly filing process — sleep is foundational to memory.