When you paint from observation, and you carefully reproduce the colors you see in your painting, the color will never look 'muddy'. (with color i mean hue value and saturation). So colors themselves are never 'muddy'. They only look muddy when they don't express the light and material you want to describe. If your colors look muddy: try to hit the colors in your subjet more accurately. Compare colors in your painting to the subject and try to answer the questions : does the color in the subject look redder/bluer/ yellower / darker / lighter / more or less saturated etc than in my painting, and change if necessary.. Then at some point the painting won't look muddy anymore..
A good book on color mixing helps (eg. Helen van Wyck.) I feel that I have less difficulty in mixing the color I want using high quality paints like Old Holland. This paint is more expensive, but you don't need the most expensive pigments. Most colors also come in a cheaper A-series alternative.