It is frowned upon by some places, but others allow it either within their institution or some satellite clinic affiliated with the institution. For example, when I was researching programs prior to the application process (checking FRIEDA and the program's website), I made sure to find out if moonlighting was permissible. During the interviews, I asked the residents if it was allowed and where they went to do these moonlighting shifts. It certainly helps knock down some of the debt, in fact, at one program, one resident said she had almost finished paying off her school loan!
Some residents covered shifts within their own hospital, others (at other programs) did it at a satellite clinic affiliated with their hospital (their attending staff may have positions there). When I interviewed in NYC (not Manhattan) the residents I met with said that they were going to Long Island, Connecticut, and other NY counties north and west of the city, they nentioned it being very difficult to get shifts unless you went to these places.
As for time to do the shifts: days off, holidays, vacation days. Sorry for the long post. 😎 😎 😎