Unstretched strings take a long time to 'settle in'.
When you replace your strings, do it one string at a time. Bring the new string up to match the next lower-pitched string. (ie: tune a new G string to D) Gently pull up on the string near the 12th fret. Retune to the lower pitch. Repeat this until the string no longer goes out of tune when you pull up on it. Then tune it up to proper pitch. This simulates the stretching a string undergoes during the first few days of playing, with much less risk of breaking a string at full tension.