Berries, along with chocolate chips, nuts and other mix-ins you might like to add to cakes, breads and muffins, often seem to sink to the bottom of the pan during baking. While you still get to eat the same number of berries per muffin, this usually means that you have one bit of berries and several of plain cake. Berries sink when a batter is not thick enough to support their weight and hold them up during baking. Choosing a recipe that you know has such a batter will produce the best results. One other benefit of using very thick batters is that you will get a much more bakery-like dome to your muffins, since the muffin will be able to support the weight of a high rise better.
But to prevent the berries from sinking into a thinner batter, tossing them with a little bit of flour before stirring them in can help a bit. The flour helps them "grab on" to the rest of the batter and remain in position during baking. Adding a teaspoon of flour will not change the way the recipe works or tastes, so it's a good trick to keep in mind just in case, whether you're working with a thick batter or not.
You can also simply poke the berries into the top of the batter once it is in the pan, instead of stirring them into the batter while it is still in the mixing bowl. This way, even if they sink, they have a much better chance of remaining in the center of the muffin or cake.