My daughter did that! I found I had to talk to her really loudly, telling her some story (three little pigs etc.) for her to eat enough. If she wouldn't wake up, I'd set her on the floor without a blanket, and she'd wake up pretty soon, and we'd start over.
It sounds like he's using the breast more for comfort, to get himself to fall asleep, than for eating... but that's a bad habit. He needs to go to sleep on his own...
You can also consider getting him off your breast as soon as he stops sucking, not letting him linger if he isn't eating anything. That will prevent him from sticking to you just to get to sleep. (Remember, your breasts are really warm and snuggly, too...not just food). Making it clear that it's time to EAT or time to SLEEP may get him steered. It took a bit to get my daughter used to it, though (sorry!).