Literally, the term ukiyo means "Floating World." However, it is also a homophone (a word that is written differently but sounds the same when spoken) with the Japanese term for "Sorrowful World." In Japanese Buddhism, "sorrowful world" is shorthand for the endless cycle of rebirth, life, suffering, death, and rebirth from which Buddhists seek to escape.
During the Tokugawa Period (1600-1868) in Japan, the word ukiyo came to describe the lifestyle of meaningless pleasure-seeking and ennui that typified life for many people in the cities, particularly Edo (Tokyo), Kyoto, and Osaka. Among the participants in ukiyo culture were samurai, kabuki theater actors, geisha, sumo wrestlers, prostitutes, and members of the increasingly wealthy merchant class.
For those in the entertainment industry, the creation and maintenance of this floating world of pleasures was a job. For the samurai warriors, it was an escape; over the 250 years of the Tokugawa period, Japan was at peace. The samurai, however, were expected to train for war, and to enforce their position at the top of the Japanese social structure despite their irrelevant societal function and ever-smaller incomes. Merchants, interestingly enough, had exactly the opposite problem. They grew increasingly wealthy and influential in society and the arts as the Tokugawa era progressed, yet merchants were on the lowest rung of the feudal hierarchy, and were absolutely barred from taking positions of political power.
In order to cope with their frustration or boredom, all of these disparate people came together to enjoy theater and musical performances, calligraphy and painting, poetry writing and speaking competitions, tea ceremonies, and of course, sexual adventures. Centered at Yoshiwara, Edo's most important pleasure quarter, ukiyo was an unrivaled arena for artistic talent of all kind, marshalled to please the refined taste of the sinking samurai and rising merchants alike.
One of the most enduring art forms that arose from the Floating World is the ukiyo-e, literally "Floating World picture," the famed Japanese woodblock print. Colorful and beautifully crafted, the woodblock prints originated as inexpensive advertising posters for kabuki performances or teahouses. Other prints celebrated the most famous geisha or kabuki actors. Skilled woodblock artists also created gorgeous landscapes, invoking the Japanese countryside, or scenes from famous folktales and historical incidents.
Despite being surrounded by exquisite beauty and every earthly pleasure, the merchants and samurai who partook of the Floating World seem to have been plagued by the feeling that their lives were meaningless and unchanging. This is reflected in some of their poems.
1. toshidoshi ya / saru ni kisetaru / saru no men
Year in, year out, the monkey wears the mask of a monkey's face. 
2. yuzakura / kyo mo mukashi ni / narinikeri
Blossoms at dusk - making the day that just passed seem long ago. 
3. kabashira ni / yume no ukihasi / kakaru nari
Resting uneasily on a pillar of mosquitoes - a bridge of dreams. [17th century]
After more than two centuries, change did come at last to Tokugawa Japan. In 1868, the Tokugawa shogunate fell, and the Meiji Restoration paved the way for rapid change and modernization. The bridge of dreams was replaced by a fast-paced world of steel, steam and innovation.