When power is to be transferred to a mm-sized \gls{imd}, located multiple cm deep inside the human body, the main goal is often to maximize the received power, within the applicable \gls{sar} limits. It has been shown that, for equivalent homogeneous biological tissue, there is little difference between the received power using \gls{wpt} at (sub-)GHz frequencies compared to low MHz frequencies. However, it remains unclear whether the introduction of additional tissue layers, thus more accurately approximating the real environment, changes the optimal frequency for maximum received power. This paper presents an analytical model that can be used to calculate the \gls{em} fields, \gls{sar}, received power, and \gls{pte} in a planarly layered environment, consisting of an arbitrary number of layers with arbitrary thicknesses and arbitrary dielectric properties. The model is first validated by comparing it to CST Studio Suite\textregistered. It is then used to determine the optimal frequency for \gls{wpt} to a mm-sized implant, located multiple cm deep inside the human body. The optimal frequency is 10 kHz, and the received power is approximately constant up to 300 kHz. The same holds for the \gls{pte}.