I would not attempt breeding bettas in a 5 litre tank but that is just my opinion. I personally think that it would be too small. Bad battering of the female or even fatality and ceaseless disruption of the nest would be imminent. This because the female would not have enough space to free herself from the male's field for some rest. If they do breed, the male would be more liable to feel that his property has been invaded by the fry and eventually eat most of them in just a matter of minutes.
Having said this, I have come acroos a breeder on the internet that breeds them in quite small spaces. The only thing to note however is that he is a betta farm breeder and both he and his workers constantly watch closely the breeding pairs so as to avoid such accidents happening.
That's the exact capacity of my Nano, in which I bred the Lace Spawn. It will do completely fine for the spawning process and the first month and a half approx. Good luck and keep us updated with how it goes.
I bred my Siamese fighters in small aquaria like 30cm *20cm*20cm (about 12 litres)with no problems. You must be sure that the female is ready for breeding and when the fry hatch I reduce the water level, so that when I'll feed them they find the food immediately.