Christ was tempted by the devil for forty days and nights. In Matthew and Mark you could get the impression that the temptation started at end of the forty days, but Luke gives more information.
Temptation came to Christ, and can equally come to us, in all circumstances. He is on a spiritual high and yet there is temptation. You can be at your happiest in the Lord, fresh from prayer, lifted up and having seen great things, and yet you can still be susceptible to terrible temptation.