When a girl is overweight, is it likely for her period to be irregular??

my cousin kept getting a period for 2 months, she was really over weight, now she has lost 120 pounds and said she now has a regular period...my other cousin kept getting her period for 3 months...thats how long it lasted..she lost weight and now this doesn't happen...so can it be because of the weight...why???