Sleeping verbs and まで vs までに


So I was wondering, pretty much all of the sleep related verbs switch meaning
with まで and までに.

Was it always like that? Or was there a time when ８時まで寝る meant "going to bed
at 8"?

Or take the even more obvious 寝入る, same story. ８時まで寝入る _shouldn't_ mean
getting up at 8.

Just curious where that original meaning went or if it was always like that.

