Flat muffins can result from overmixing the batter, which deflates the air bubbles that help the muffins rise. It’s also possible that your baking powder or baking soda wasn’t fresh enough, or the oven temperature was too low, preventing proper rise.