I played the lottery a few times several years ago. Since I was out, it seemed like a bit of a guilty pleasure. I don't know if it was a DF offense, but I know it was discouraged. Whether it's a sin or not, I don't know. I'm not sure there is clear Biblical guidance.
I do recall a news story many years ago, where a local (NYC) pastor's wife played the lottery and they won $250,000. The pastor was notorious for his anti-gambling and anti-lottery sermons, and so it was an embarrassing turn of events. But he did not even flinch. He called it "a gift from god." I suspect that he dropped the topic of lotteries in any future sermons, though.