From the Super Mario Wiki, the Mario encyclopedia
When Mario, Luigi, Starlow and Dreambert collect the five Zee Parts that are required to create the Ultibed, they ask Bedsmith to put it together for them, he agrees. And so, the group follows him to Somnom Woods where he creates the Ultibed. Luigi tries to sleep on the Ultibed immediately. But Bedsmith tells him that he cannot create a Dream Portal to access Dreamy Somnom Woods, the Dream World the Zeekeeper resides in, he must sleep on the Ultibed in the Pi'illo Temple, which is said to magnify dream powers. When the group arrives to the temple, they find Pi'illodium, the defender of the Pi'illo Temple, it awakes and attacks them, thinking they were intruders. When Pi'illodium is defeated, Luigi can finally sleep on the Ultibed and create a Dream Portal for Mario access Dreamy Somnom Woods and find the Zeekeeper there.