In this study, we have reconstructed the statistical 3D structure of hundreds of nanometers thick surface immobilized flagellar filament protein layers in their native environment, in buffer solution. The protein deposition onto the surface activated Ta2O5 film was performed in a flow cell, and the immobilization process was followed by in situ spectroscopic ellipsometry. A multilayer optical model was developed, in that the protein layer was described by five effective medium sublayers. Applying this method, an in-depth analysis of the protein layer formation was performed. Based on the kinetics in the distribution of the surface mass density, the statistical properties of the filamentous film could be determined computationally as a function of the measurement time. It was also demonstrated that the 3D structure of the protein layer can be reconstructed based on the calculated in-depth mass density profile. The computational investigation revealed that the filaments can be classified into two individual groups in approximately equal ratio according to their orientation. In the first group the filaments are close to laying position, whereas in the second group they are in a standing position, resulting in a significantly denser sublayer close to the substrate than at a larger distance.Highlights► Flagellar filaments were immobilized onto Ta2O5 substrates in flow-cell. ► The surface was monitored in situ with spectroscopic ellipsometry. ► New optical model was developed for the characterization of the filamentous layers. ► The depth profile of protein mass density was determined. ► The statistical 3D structure of the filamentous layer was reconstructed.