「寝る 前に」 means "Before sleeping" or "Before going to bed." The pattern 「〜まえに」 is used to say "before (doing something)." You attach 前に to the dictionary form of a verb, like 「寝る」 (to sleep). It indicates an action that happens prior to another event.
「〜前に」は「〜する前に」という意味です。「寝る 前に」は「寝る前に」と、行動の順序を表します。
Project Eagleなら、AIがあなたの弱点を一瞬で検知。豊富なクイズ・模擬試験・音声読み上げトレーニングで日本語を完全攻略!