Submarine caves are environments of great ecological interest because of the occurrence of peculiar conditions, such as the attenuation of light and reduced water turnover, which can determine oligotrophic conditions from the entrance to the interior part of the cave. These environmental gradients may influence the distribution of the communities inhabiting submarine caves. In this study we investigated the meiofaunal community and nematode assemblages from the sediments inside and outside two submarine caves in Ustica Island Marine Protected Area (southwest Italy): Grotta Falconiera and Grotta dei Gamberi. Consistently with a general pattern of distribution reported by several studies on benthic organisms, our results showed a decrease in the abundance and changes in the taxa composition of the meiofaunal community along the exterior-interior axis of the caves, also highlighting the dissimilarity between the dark and semi-dark communities. We found a significant influence of the availability of organic matter (i.e. phytopigment concentrations) on the distribution and composition of both the meiofauna and the nematode community inside the caves. Different nematode assemblages characterized the inside and the outside of the two caves, with species occurring exclusively in the sediment of both caves, particularly in the dark portions, and completely absent in the external sediments. Environmental features of submarine caves may affect food resources inside the caves and consequently trophic nematode assemblages. Our results showed a difference in feeding strategies between nematodes inhabiting the caves and those living outside, suggesting that in the two caves investigated, bacteria might represent the most important food source for nematodes.