I have 7 recessed lights in my kitchen. They stopped working over a period of a few months, one by one, until none worked. Every now and then, one of them will come on, sometimes the one on the back left, some times the center front,etc. That light will sometimes turn it self off. If I turn it off by the switch, I can't get it back on. The bulbs have been replaced (I made sure and got the bulbs sized listed in the cans). What the heck is wrong? BTW, they use the 4 prong bulbs.
Most recessed lights have a thermal overload built into the can. Once they start going bad they will come on and then go off and eventually they won't come on. Your symptoms you are describing are similar to these thermal overloads faulting. The other thing I would look at is whether or not this type of recessed can have a ballast or driver they too may be going bad. Depending on the can's age and manufacturer you might be able to have them replaced, but sometimes you have to replace the unit. Before I did that I would check the switch and make sure you have voltage at the load side of the switch. Then I would check to see if I hade voltage at each can by checking the prong receptacles.