How long you stay depends on what you want to do there. There are organized trails every day, so if you want to do organized trails every day you could stay the whole time. The vendor expo is Thursday and Friday, that's worth attending. Friday night is the merchandise raffle, this year I think around $250,000 in merchandise donated by vendors was given away, so if you feel lucky you might want to be there Friday night.
I've been to the event 8 times, I always get in on Saturday afternoon and leave the following Sunday morning. I usually to one or two organized trails, I attend both days of the vendor expo, and the other days I'll do trails by myself.
You can stay as long or as short as you want, but if you want to stay in a hotel they fill up fast so make reservations as soon as you decide. I usually make my hotel reservations in May of the prior year to so I get my choice of hotel.