The two leaders also performed an 'aarti'.
"Jai Shri Ram! Blessed to have the Divya Darshan of Bhagwan Shri Ramlalla Virajman at the Shri Ram Janambhumi Mandir in Ayodhya with UP CM Shri Yogi Adityanath ji. May Lord Shri Ram bless us all with good health and happiness," Sonowal tweeted.
Yogi Adityanath and Sarbananda Sonowal are in the holy city to launch various developmental projects.
The visit comes amid the Yogi Adityanath-led government facing flak over the alleged land 'scam' in Ayodhya linked to local MLAs and relatives of state government officials.
"It is a very serious matter. My party would want the Supreme Court to take notice and if the allegations are true, the state government needs to get the deals cancelled," she told reporters in Lucknow when asked to comment on the report.