After some research, I found these reasons why muffins may deflate:
-over-mixing. Muffin batter should be lightly mixed.
-cooling too quickly. Let them cool in pan for 10 minutes before removing to slow down the cooling time.
-air trapped in the pan when you pour the batter in. Try gently dropping the pan on the counter to chase out the air bubbles before baking.
I've never made muffins from scratch though, so that's just stuff I found online. Good luck!
All the points lemongrass made are right, people tend to overmix the batter, they see lumps they feel they gotta mix it better - not so, as with pancakes and corn muffins you WANT it a little under mixed.
I think my problem after reading this is cooling to quickly.. Most often the get pop out've pan right away, and into freezer to cool off.. My girls want then yesterday after there done licking out the bowl ect.
I agree with all comments....but they have to cool for ten minutes in the pan, then fully cool on a rack (not a solid surface) or they will get steam trapped on the bottoms....which can make them soggy on the bottom.