It happened at that time, when Eli was laid down in his place (now his eyes had begun to grow dim, so that he could not see),
"Eli was lying down in his own place ...  Samuel lay down in his place"  (1 Samuel 3:2,9).  The phrase within the temple of the Lord  (1 Samuel 3:3) does not mean within the Holy of Holies but is a reference to the entire temple area at Shiloh.  Sleeping quarters for Eli and Samuel were in some unspecified area and quite near each other.