Q: A recessed light in our bathroom turns itself off if left on for a long period. It cannot be turned back on for an hour or so. Why does this happen?
A: The light is probably overheating and its thermal switch is causing it to turn off. The thermal protection kicks in when the fixture's temperature gets above 194 F. Sure, it's a nuisance, but it's telling you that there's a problem.
It's likely the bulb in the fixture has a wattage higher than the fixture is designed for. Install a lower wattage bulb or a compact fluorescent bulb of the correct length.
It's also possible that fiberglass insulation has been installed against the light. If the light is not rated for insulation , it will overheat.