This paper analyzes the resource allocation problem in an indoor PLC system with a physical (PHY) layer based on OFDM and a medium access control (MAC) scheme with contention and adaptive TDMA regions, similar to the one of the HomePlug AV specification. In particular, this work focuses in the optimization of the TDMA region. By taking into account both the cyclostationary noise and the cyclic variations of the channel response, the optimal time slot duration in a multi-user scenario is determined for various amounts of overhead required by the PHY layer. Hence, the presented results can be used in practical systems to perform a fast real-time time slot length selection and scheduling as a function of the number of active users.