Wrong Sentence: Alex only studies when everybody else at home has gone to sleep.
Right Sentence: Alex studies only when everybody else at home has gone to sleep.
Right Sentence: Alex studies only when everybody else at home has gone to sleep.