Quality of life is an interesting frame, though through that lens, some research tends to show that many (but not all) lottery winners actually are worse off in terms of life quality after winning.
From The Washington Post [1] (the links to the source studies are unfortunately broken): "When a team of economists tracked the fortunes of financially distressed people in Florida who had won the lottery, they found that within three to five years, the winners of big prizes (between $50,000 and $150,000) were equally likely to have filed for bankruptcy as the small winners, and the groups had similarly low savings and levels of debt. According to the National Endowment for Financial Education, about 70 percent of people who win a lottery or receive a large windfall go bankrupt within a few years."
However, I concede that if you win the lottery and spend it wisely (e.g. maybe invest virtually all of it and live off the interest spent reasonably), it's plausible it can greatly improve quality of life. So, assuming one acts carefully when receiving the large windfall, I agree with you now that buying lottery tickets is plausibly a good idea.
[1] https://www.washingtonpost.com/outlook/five-myths/five-myths...