Can’t remember where you left your cellphone? Totally forgot about that dentist appointment? If you’re past middle age and really want to hang on to your memory, swap the Sudoku and crossword puzzles for a good night’s sleep.

Many studies have made the connection between sleep and memory consolidation—the brain’s ability to cement short-term memories into longer-term ones, so they can be recalled the next day. But as we age, deep, refreshing slumber can be as elusive as those misplaced car keys.

Thus,...