Mothers with few or no educational qualifications who gave birth in 2011 were found to be far more likely than similar mothers in 2005 to breastfeed for longer.
The Edinburgh University study showed that among such women breastfeeding for six months or more, there was a 150% higher chance of them continuing for longer in 2011 compared with 2005.
There was no similar improvement for women in more socially advantaged circumstances, although as these mothers already breastfed for longer.
Researchers said policies supporting breastfeeding introduced in Scotland during the last 10 years may have contributed to the rise in disadvantaged mothers deciding to breastfeed.
The study drew on national surveys of more than 5000 mothers in 2005 and almost 6000 mothers in 2011, and assessed breastfeeding habits of mothers in the first 10 months of their babies' lives.
Health Minister Michael Matheson said: "I'm encouraged by these findings that show an increasing understanding among Scottish women about the importance of breastfeeding and the long-term benefits it can have on a child's health.
"It is particularly pleasing to see a rise in the number of mothers from disadvantaged backgrounds who have breastfed for longer."
The study, funded by the British Academy, appears in the European Journal of Public Health.