I've noticed that when I try to book a Nightjet ticket from Frankfurt Süd to Berlin (departure 00:54), I can book a seat but not a place in Liegewagen or Schlafwagen. When I try to book the same train but starting in Basel (departure 21:13), those alternatives do show up. I suppose that late night departures or early morning arrivals are blocked in Liegewagen and Schlafwagen. During what times can I not enter or leave such compartments?
It is not so much related to the time of departure, but to which distance you are travelling. ÖBB, the train operator, publishes a complete price list for all their tickets on domestic, German relations. As you can see on pages 37 and 38, they only publish ticket prices for seating (Sitz) from (von) Frankfurt Süd to (nach) any station in Berlin. It looks as if couchette or sleeper tickets are not available if the distance is too short. My guess is that since they probably don't have means and capacity to change the bed during the journey, they want to keep their beds free for longer trips and not 'waste' a bed for the entire train journey, just because someone wants it for a shorter stretch.
Perhaps a more obvious example: As you can see from the price list, you can book a sleeper both from Heidelberg or Mannheim to Berlin, but not between Heidelberg and Mannheim, which for a 15 minute ride, would be pretty senseless anyway, I admit.
I would not doubt, that you have physical access to the sleeping and couchette cars in Frankfurt, so a workaround might seem to book a ticket from Mannheim (the last station before Frankfurt) to Berlin, on which relation you can buy a sleeper ticket. That may work, but according to the terms and conditions A.188.8.131.52, you forfeit your reservation if you don't occupy your reserved seat/bed within 15 minutes after departure. So if you have a ticket from Mannheim, don't join the train until Frankfurt, the train is nearly full and someone asks the conductor for an on-the spot upgrade between Mannheim and Frankfurt, your bed may at least in theory be given to another passenger.
There doesn't seem to be a fixed time for all trains. I checked different Nightjet lines (with destinations to Hamburg, Berlin, and Rome), and for Hamburg and Berlin sleeper coaches are available for departures before midnight (i.e. up until Mannheim. Frankfurt Süd is the first stop where you can't book them), while for Rome they are also available at least until Villach, where the train departs at 0.54.
Anyway, the coaches themselves are not locked, so once you are on the train, you can walk through them. It's just the hassle and noise of boarding passengers, which they want to avoid within the compartments themselves.