Thelwell has made 10 appearances, scoring once, while on loan at the
struggling London side.
He currently has a hamstring injury, but is expected to be fit to face Brentford on January 13.
Orient boss Martin Ling said: "Making Alton's transfer permanent was extremely important for us, so I am very pleased to get it done so early in the window.
“Since Alton has been at the club we have looked a lot more secure at the back and he has played a big part in helping us away from the foot of the table."