Co-sleeping causes it a lot. It's advised to put babies in their cot/crib or their own baby bed when he/she cries at night you'd just pick up than having the breast in the mouth all through the night.
Maybe ur baby is just used to it...withdraw him or her gently from the habit e.g by backing him or her immediately after withdrawing ur nipple he or she will sleep off!
Registered Midwife