The Royal Palace did not answer phone calls on Monday seeking comment on the criticism.
Deputy government spokeswoman Ratchada Thanadirek said it was up to police whether to act against the protesters.
"The government wants the young protesters to observe the laws so that they can continue to exercise their rights to make their demands and the country can stay peaceful,"she said.
The students from Mahanakorn and Kaset universities also called on the authorities to listen to the protesters and to reform the laws that ban criticism of the monarchy.
Student protests to demand the resignation of Prayuth's government and a new constitution now happen almost daily. While some placards have made veiled criticism of the monarchy,Monday's Harry Potter rally is the first time it has been open.
Police officer Surapong Thammapitak said:"We cannot yet determine what offences have been committed ... Any offences under any laws will be processed for the investigators."
Prayuth said in a speech in June that there have been no prosecutions under the lèse-majesté laws recently,at the King's request,but warned against criticising the monarchy.
Criticism was exceedingly rare under the King's father,King Bhumibol Adulyadej,whose 70-year reign ended with his death in 2016.
"Such open criticism of Thailand’s monarch by non-elites at a public place within Thailand — with the police simply standing by — is the first of its kind in Thai history,"said Paul Chambers,who teaches international affairs at Thailand's Naresuan University.
Loading
Meanwhile,the country's digital minister has threatened legal action against Facebook and accused the social media giant of not complying with government requests to restrict content after Facebook's auto-translation tool mistranslated a message in a broadcaster's post live-streaming the King's birthday ceremony last week. Facebook has apologised and temporarily disabled English-to-Thai auto-translation.
The incident sparked a flurry of complaints by Minister of Digital Economy and Society Puttipong Punnakanta that Facebook was not responding fast enough.
He also vowed stronger action against the company but did not elaborate.
In recent years,authorities have filed court orders along with requests to social media platforms to restrict or remove perceived royal insults and other illegal content,including national security threats and copyright violations.
"When we use Thai laws to order removals or restrictions of content and don't receive cooperation in some cases,we might need to use Section 27 of the Computer Crime Act which makes it a crime to not follow court orders,"Puttipong said.
He was referring to an article of the cybercrime law that says failure to observe a court order can result in a fine of up to 200,000 baht ($9000) and an additional 5000 baht per day until the order is observed.
Puttipong said,however,that he would not go as far as to ban Facebook because many Thai businesses relied on it to drive sales.
Reuters