By 1592, when the invasion started, Hideyoshi had already established himself as the hegemon of Japan. He had the military strength to suppress anyone who stood in his way. He had confiscated all weapons from the peasants to make sure peasant revolts doesn't happen. His biggest rival, Tokugawa Ieyasu, was moved to the Kanto region (which formerly belonged to the Hojo Clan) away from his old base of power, which meant he had to reestablish himself.
Historians have given many reasons on why Hideyoshi wanted to invade Korea and China. One of the reasons was that in addition to seeking trade, Hideyoshi wanted legitimacy. He was a peasant, and because he was not descended from the Heike or the Genji, he could not become Shogun. He had himself adopted into the Fujiwara but even then he could only take the title kampaku (regent), a position which was really just a ceremonial position at that point. If he could have Korea and even China acknowledge him, then it would further awe the daimyo into submission.
Another reason given was that Hideyoshi wanted to use this opportunity to weaken the daimyo by having them exhaust their strength fighting battles overseas.
As for manpower, Hideyoshi definitely had enough. It wasn't uncommon for him to mobilize troops in the hundred thousands to fight his campaigns. For example, Hideyoshi sent some 200,000 soldiers which bulldozed the Shimazu and Chosokabe into submission. The Siege of Odawara against the Hojo also involved up to 200,000 troops.
Hideyoshi registered 22,530,000 units of field, and each had the potential to send 250 troops, meaning he had 563,000 total troops. This was actually very close to the number of troops Ming China had in 1593. The total number of troops the Western daimyo mobilized for the Imjin War was around 330,000 and only half crossed the straight. The Eastern daimyo like Tokugawa Ieyasu and Date Masamune did not send their troops.
I'm not particularly well read on this, but I did recently pick up a book on this war after reading a related post on this sub - The Imjin War, by Samuel Hawley. I highly recommend it if you have even passing interest in the topic.
Hawley presents a few reasons for Hideyoshi's invasion so soon after unifying Japan, and several of them go beyond ability to imperative. He quotes several recorded statements from Hideyoshi about his desire to extend his rule beyond the shores of Japan. In large part, it seems that Hideyoshi ascribes this as a desire backed by fortune telling from his youth that he would spread his name and fame across the earth.
In addition, Hideyoshi had many rivals who he had been keeping busy with internal warfare, all of whom now had no one to fight. A large measure of Hideyoshi's success at unifying these many groups was his increased willingness to take surrenders and reward those who chose to give up and join him rather than fight, which included awards of profitable land to the daimyo who joined him. With no more land in Japan to give away, Hideyoshi was a bit stuck - tons of rivals who were used to years of war, hundreds of thousands of soldiers, etc. The invasion of China was seen as a way to gain further profitable territory and keep his many vassals happy so they wouldn't murder him or return to fighting between one another for local power.
As far as manpower, Hawley claims that in 1591 Hideyoshi could field 250,000 men and a large number of skilled and experienced generals to lead them, and could arm many but not all of them with muskets. He compares this to European "single-state armies" which "rarely topped 50,000" troops.