I think I'll go to bed.

Literal

Sleep-[volitional-よう] [quotative-と] think.

The pattern [verb-volitional] + と思う expresses 'I think I'll X' — a softer, less committed form of intention than 'I will X.' 寝よう is the casual volitional of 寝る ('to sleep/go to bed'). The と is the quotative, marking the volitional as the content of the speaker's thinking. Compare with [verb-dictionary] + つもりだ, which is more concrete planning.