Shuìxǐng hòu tā cái míngbai, suǒwèi de rónghuá-fùguì búguò shì huángliáng-yímèng.
Only when he woke up did he realize that all that wealth and glory had been a fleeting dream.
Tips
history
From the Tang story 《枕中记》: a poor scholar, 卢生, falls asleep at an inn in 邯郸 on a magic pillow and lives a whole life of rank and riches in his dream, then wakes to find the innkeeper's yellow millet still not cooked. Also 黄粱梦 or 黄粱美梦.