The appeal came as about 30 suspected pirates are still being held on board a Russian warship after carrying out an unsuccessful hijack attempt on a Liberian-flagged and Russian-crewed tanker.
Media reports said they could face trial in Russia as navy commanders and diplomats experience difficulties finding any Gulf of Aden littoral state willing to take the pirates.
"We should discuss the problem from the point of view of our criminal law and consider the possibility of establishing an international body to examine such cases," Medvedev told Russia's top prosecutor Yury Chaika.
"We have to consider all options, including the creation of an international court," Medvedev said adding the problem has affected many countries and shipping companies.
Somali pirates have stepped up attacks on merchant ships in the Gulf of Aden, seizing vessels and kidnapping crews, receiving millions of dollars in ransom. Naval forces from at least a dozen countries have been involved in anti-piracy operations off Somalia.
Media reports earlier said Russia had no agreements with regional nations that would allow it to hand over the suspects. Russia has no diplomatic mission in Somalia, where most of the detainees come from.
"Our naval personnel are in contact with other countries' naval forces [deployed in the area]. But we need a legal assessment of what is happening, rather than military action, that option is always in our disposal," Medvedev said.
Moscow is entitled under a United Nations Security Council resolution to take the suspects to Russia for trial. The United States has already resorted to the taking legal action to prosecute a suspected Somali pirate in New York.
Piracy is punishable under Russian law by a prison term of between five and 15 years, and a fine of 500,000 rubles ($15,000).
Chaika, however, highlighted problems in identifying the suspected pirates. Experts earlier said that proving in a court of law the attempted attack could also be difficult.