Period while breastfeeding

Summer

Wondering from anyone else’s experience if some people have gotten their period around 3 months postpartum and then randomly have it stop when baby is 5 months? Is it just because hormones during breastfeeding?