Here's a pop quiz: What foods are best to eat before a high-stakes test? When is the best time to review the toughest material? A growing body of research on the best study techniques offers some answers.

Chiefly, testing yourself repeatedly before an exam teaches the brain to retrieve and apply knowledge from memory. The method is more effective than re-reading a textbook, says Jeffrey Karpicke, an assistant professor of psychological sciences at Purdue University. If you are facing a test on the digestive system, he says, practice explaining how it works from start to finish, rather than studying a list of its parts.

In his junior year of high school in Cary, N.C., Keenan Harrell bought test-prep books and subjected himself to a "relentless and repetitive" series of nearly 30 practice SAT college-entrance exams. "I just took it over and over again, until it became almost aggravating," he says.

Practice paid off. Mr. Harrell, now 19, was accepted at University of North Carolina-Chapel Hill, a college he's dreamed of attending since the third grade. He scored 1800 (out of 2400) on the SAT, up 50% from 1200 on the PSAT, a preliminary test during his sophomore year.

Taking pretests "felt like hard work," Mr. Harrell says, but seeing steady increases in his scores boosted his confidence. Practice tests also help with test-taking skills, such as pacing, says Paul Weeks, vice president of educational services for the ACT, which creates and administers college-entrance exams.

Repeated practice tests help master test format and pacing. Getty Images

Sleep also plays a role in test performance, but in two unexpected ways. Review the toughest material right before going to bed the night before the test. That approach makes it easier to recall the material later, says Dan Taylor, director of a sleep-and-health-research lab at the University of North Texas in Denton. And don't wake up earlier than usual to study; this could interfere with the rapid-eye-movement sleep that aids memory, he says.

A common study habit—the all-nighter—is a bad idea. Although 60% of college students stay up all night at some point in school, the practice is linked to lower grades, says Pamela Thacher, an associate professor of psychology at St. Lawrence University in Canton, N.Y., based on a 2008 study of 120 students. It also impairs reasoning and memory for as long as four days.

Being Confident Write down fears and anxieties before the test to free working memory and prevent distractions during the test. To combat self-doubts (such as 'I'm bad in math'), remind yourself of proven personal traits and strengths that can propel you to success. Practice in advance facing all the pressures you will face on exam day, such as driving to the testing center or visiting an unfamiliar testing room. Test yourself by recalling broad concepts rather than trying to memorize facts or re-reading textbooks. Before the test, envision yourself answering questions calmly and with confidence.

Everybody knows you should eat breakfast the day of a big test. High-carb, high-fiber, slow-digesting foods like oatmeal are best, research shows. But what you eat a week in advance matters, too. When 16 college students were tested on attention and thinking speed, then fed a five-day high-fat, low-carb diet heavy on meat, eggs, cheese and cream and tested again, their performance declined. The students who ate a balanced diet that included fruit and vegetables, however, held steady, says Cameron Holloway, a senior clinical researcher at the University of Oxford. The brain requires a constant supply of energy and "has only a limited backup battery," he says.

While many teens insist they study better while listening to music or texting their friends, research shows the opposite: Information reviewed amid distractions is less likely to be recalled later, says Nicole Dudukovic, assistant professor of psychology at Trinity College, Hartford, Conn.

In her research, college students categorized and made judgments about pictures of more than 100 items. Then, they were tested on a new mix of pictures and asked to recall which ones they had already seen and how they had categorized them; half the time, they were also asked to listen and respond to a set of rhythmic sounds. When the students were tested later, they were more likely to remember correctly what they had studied without distractions.

"Students do have this belief that they can do it all and they aren't really being distracted" by music or sounds from a noisy cafe, Dr. Dudukovic says. But while the sounds may "make them feel more relaxed," she says, they won't help them ace the midterm.

Bryan Almanza says he did poorly on the PSAT as a high-school sophomore because he didn't know how to prepare. He got too little sleep the night before and ate only a bowl of cereal for breakfast. On the test, some hard physics questions made him nervous and distracted, says Mr. Almanza, 18, a senior at Campbell High in Smyrna, Ga. "I'm going to fail," he remembers thinking at the time. A test-prep program at his school taught him to get plenty of sleep, eat a good breakfast and pace himself on the test. By staying calm, optimistic and focused, he raised his score significantly on the SAT.

Tips on Conquering Test-Day Jitters

Even when students are fully prepared, anxiety can be another burden on test day.

An estimated 35% of students are so nervous before high-stakes tests that it impairs their performance, says Richard Driscoll, a Knoxville, Tenn., clinical psychologist who has researched text anxiety.

To help ease fears, Julie Hartline, lead counselor at Campbell High School in Smyrna, Ga., helped start a three-week program last year to teach juniors anxiety-reduction techniques.

One calming tactic that has been shown to improve scores is to teach yourself in advance to think differently about the test, Dr. Driscoll says. Envision yourself in a situation you find challenging and invigorating; a soccer player might imagine scoring a goal, or a mountain climber might envision herself topping a ridge, he says. Then switch your mental image to the testing room and imagine yourself feeling the same way. With practice, you'll be able to summon up more confidence on test day.

Also, reducing "novelty and stress on the day of the exam" can prevent choking under pressure, says Sian Beilock, a researcher and author on cognitive performance. If you are taking the exam in an unfamiliar place, visit the room in advance.

If you are still feeling anxious, set aside 10 minutes beforehand to write down your worries, says Dr. Beilock, an associate professor of psychology at the University of Chicago. She and a fellow researcher tested 106 ninth-graders for anxiety before their first high-pressure exam, then asked half of them to spend 10 minutes writing down their thoughts right before the test. The anxious kids who did the writing exercise performed as well on the test as the students who had been calm all along. But anxious students who didn't do the writing performed more poorly. Expressing one's worries in writing, Dr. Beilock says, unburdens the brain.

—Email Sue.Shellenbarger@wsj.com