The asteroid Lutetia at closest approach as seen by Europe's Rosetta spacecraft in July 2010. [Full Story]

Tom Hanks and Meg Ryan were sleepless in space last month.

It wasn't the flesh and blood actors, but their astronomical counterparts — asteroid 12818 Tomhanks and asteroid 8353 Megryan — that made a cosmic rendezvous. The two asteroids, discovered seven years apart in different hemispheres, both happened to make their closest approach to Earth in September.

The cosmic events reunited the space rock versions actors well known for co-starring in such films as "Sleepless in Seattle" and "You've Got Mail."

And they aren't the only pop culture-themed space rocks headed our way.

Other objects making their closest approaches to Earth this month include: asteroid 3656 Hemingway, asteroid 7032 Hitchcock, asteroid 4457 van Gogh, asteroid 18932 Robinhood, asteroid 2919 Dali, asteroid 2266 Tchaikovsky, asteroid 3769 Arthurmiller, and asteroid 214476 Stephencolbert. [7 Strangest Asteroids in the Solar System]

Asteroid 12818 Tomhanks swung within about 151 million miles of Earth on Sept. 12, while 8353 Megryan came about 191 million miles away on Sept. 27. Neither came closer than the distance between the Earth and the sun, and they did not pose any risk to our planet.

And like most romantic comedies, there's a funny story behind how these space rocks got their famous Hollywood names.

This NASA image shows the orbital path of asteroid 12818 Tomhanks, an asteroid named after actor Tom Hanks, which is located in the asteroid belt between the orbits of Mars and Jupiter. (Image credit: NASA/JPL)

Deserving of an asteroid

Asteroid 12818 Tomhanks was discovered on April 13, 1996 by University of Arizona astronomer Joseph L. Montani, part of a group of astronomers called Spacewatch who observe from University of Arizona telescopes in Kitt Peak, Ariz. The asteroid wasn't officially named until later, once its orbit had been well determined by multiple observations.

Spacewatch member Jim Scotti, a senior research specialist at the University of Arizona, bestowed the name "Tomhanks" in honor of Tom Hanks, the actor.

"I started thinking about people that deserved asteroid names," Scotti told SPACE.com. "Tom Hanks is a fellow space geek, he grew up with Apollo and man walking on the moon."

Scotti was impressed with Hanks' work acting in the 1995 film "Apollo 13," which dramatized the real-life 1970 NASA moon mission, as well as the follow-up 1998 HBO series "From the Earth to the Moon," which Hanks hosted and co-produced.

"I was just tickled pink with those kinds of programs and was inspired to name an asteroid after Tom Hanks," Scotti said. "I also named one after Ron Howard," the director of "Apollo 13" and a co-producer of "From the Earth to the Moon."

This NASA image shows the orbit of asteroid 8353 Megryan in the asteroid belt between the orbits of Mars and Jupiter. The asteroid was discovered in 1989 and named after actress Meg Ryan. (Image credit: NASA/JPL)

Space rock naming rights

Asteroid 8353 Megryan was first discovered on April 3, 1989 by Eric Elst at the European Southern Observatory (ESO) in Chile. [Cosmic Photos from ESO's Chile Observatory]

"Once the asteroid has been observed enough so that its orbit is well determined, it receives a sequential number, and the discoverer can name the asteroid," ESO astronomer Olivier Hainaut wrote in an e-mail to SPACE.com. "There are some constraints on the name that can be chosen, but in short, that name has to be 'usable' and should not be offensive, political or commercial. The citation and justification are completely left to the sole opinion of the discoverer."

In naming 8353 Megryan, Elst provided a citation listed in NASA's Jet Propulsion Laboratory Small-Body Database. "Margaret Mary Emily Anne Hyra (Meg Ryan, b. 1961) majored in journalism and later became an actress. She showed her talent in 'You've got Mail' (1999)."

Both 8353 Megryan and 12818 Tomhanks are main belt asteroids that generally circle the sun between the orbits of Mars and Jupiter. They are just two of the millions of space rocks that are left over shards from the era of planet formation in our solar system.

These days, Spacewatch alone discovers between 3,000 and 4,000 new asteroids a night at Kitt Peak, Scotti said. They are easy to pick out against the backdrop of stars because, though they look like a simple speck of light, they move. When astronomers expose their cameras for five minutes, the stars stay in their places, but asteroids streak across the frame.

"Asteroids are a dime a dozen really," Scotti said. "We actually have way more than we could possibly ever name."

You can follow SPACE.com senior writer Clara Moskowitz on Twitter @ClaraMoskowitz. Follow SPACE.com for the latest in space science and exploration news on Twitter @Spacedotcom and on Facebook.