If feels good to pull a perfectly baked loaf from the oven, filling the whole house with a pleasing aroma of fresh bread. Sometimes even the best bakers might have loaves that collapse and drop in the middle while they're cooling. This has several causes, but a few adjustments to your recipe or method will usually fix the problem.
Bread and Its Structure
Your bread's height and texture rely on the relationship between the activity of the yeast and the gluten levels, or strength, of your flour. Gluten is formed when proteins in the flour are moistened and kneaded, creating long strands of stretchy, elastic protein. The yeast in the dough consumes the flour's natural sugars, converting them into carbon dioxide. The stretchy gluten traps the tiny bubbles of carbon dioxide, creating the tiny pockets that make up your bread's crumb. When you bake the bread, the yeasts create a final burst of carbon dioxide, the gas itself expands in the oven's heat, and the starches and proteins in the dough cook to a firm texture, holding that shape.
Not Enough Gluten
One of the reasons bread might drop during the cooling process, or even while it's still in the oven, is a lack of gluten development. This can happen if you're not kneading the dough well enough to create gluten development, or if your flour just doesn't have enough gluten to begin with. Mixing and kneading the dough longer -- laborious by hand, easy with a stand mixer -- can often fix the problem. You might also switch from all-purpose flour to higher gluten bread flour, or add a small quantity of pure vital gluten along with the rest of your dry ingredients.
Too Much Rise
Using too much yeast can also cause your bread to fall, by helping it rise too enthusiastically. Over-risen loaves tend to have extra-large bubbles inside, and the gluten might not be strong enough to support this high and fluffy structure once it cools. A similar problem can occur if you leave the bread to rise for too long. It will expand in the oven, but the gluten becomes weak from over-fermenting and can't keep the bread at its maximum height. A smell of alcohol or fermentation is often a telltale sign of over-risen dough.
Relatively few oven thermostats are completely accurate, and it might be that yours is running too hot. Your bread would brown and look perfectly baked, but not be fully cooked in the middle. That doughy section collapses as it cools, and your bread sinks. You can improve the odds by testing your bread with an instant-read thermometer, until it shows an internal temperature of 200 degrees Fahrenheit. Cooling the bread too rapidly after it comes out of the oven can also be problematic. The bread must cool gently so its starches have time to firm up or "set" in their fully risen condition. If the loaf is in a cold draft, its air pockets will shrink before the starches can do that and the net result will be a fallen loaf.