Not super cheap, but Hotel Las Tortugas is right on the main break. They have apartments that are back off the beach a bit. My friends and I stayed in the apartments and I thought they were reasonable. Granted, it was several years ago. Was a 5 min walk to the main break from the apartments, and the hotel part is the closest to the beach of any hotels. We ended up hanging with a kid that was staying there for an extended period in one of the apartments, and he had worked some kind of deal with the owner.
The apartments were varied in size. They had little kitchens and I think some had AC. With a stay that long in one place I'm guessing you can probably negotiate a good price since your a guaranteed revenue stream for them for a while. The owner seemed very nice.
Playa Grande is definitely a cool place, but if I was going to Costa for a few months, I'd probably consider mixing it up and moving around a little if possible. In that area of the country, I might try to plant myself at Playa Guiones (Nosara area) for a while. Although considered a longboard wave by many, I had a blast on my shortboard, and it seemed more consistent with size. Lots of lodging options in that area also.