Adopting hyperon-nucleon and hyperon-nucleon-nucleon interactions parametrized in chiral effective field theory, single-particle potentials of the $Lambda$ and $Sigma$ hyperons are evaluated in symmetric nuclear matter and in pure neutron matter within the framework of lowest order Bruckner theory. The chiral NLO interaction bears strong $Lambda$N-$Sigma$N coupling. Although the $Lambda$ potential is repulsive if the coupling is switched off, the $Lambda$N-$Sigma$N correlation brings about the attraction consistent with empirical data. The $Sigma$ potential is repulsive, which is also consistent with empirical information. The interesting result is that the $Lambda$ potential becomes shallower beyond normal density. This provides the possibility to solve the hyperon puzzle without introducing ad hoc assumptions. The effects of the $Lambda$NN-$Lambda$NN and $Lambda$NN-$Sigma$NN three-baryon forces are considered. These three-baryon forces are first reduced to normal-ordered effective two-baryon interactions in nuclear matter and then incorporated in the $G$-matrix equation. The repulsion from the $Lambda$NN-$Lambda$NN interaction is of the order of 5 MeV at the normal density, and becomes larger with increasing the density. The effects of the $Lambda$NN-$Sigma$NN coupling compensate the repulsion at normal density. The net effect of the three-baryon interactions to the $Lambda$ single-particle potential is repulsive at higher densities.