Have you talked to your doctor or a lactation consultant?
At five months you'd like your child to be having a longer sleep during the night - that is really age appropriate. It is one step on the way to being able to sleep through the night. Your child is eating more at each feeding, and developing the ability to go for longer between meals. As kids age they eat more efficiently, so they eat less often, for less time, but get a lot more milk. That is age appropriate.
I'm curious if your doctor or lactation consultant told you that you were losing your milk supply, or how you decided that was true? Most breastfed kids are getting what they need from their moms naturally, without much work on the mom's part. (Of course, not every kid, but, an expert is going to do a better job of telling you the truth than people who haven't seen you or your kid.)
You kid will go through periods of need more (for a growth spurt or brain development) and will naturally eat more often and suck harder. At other times your kids will need less food and will naturally eat less frequently and consume less at each feeding. That is appropriate.
At any rate, thank your lucky stars that your child is getting more sleep, and that you can too. As time goes on your body will adjust to making more milk during the day and less at night, and your kid will still get enough to eat!
It sounds to me like you're doing a good job, and that you have a kid right on track. You could try finding some self- assurance about that through a PEPS or LeLeche group.