to do something as much as one wants; to one's heart's content; thoroughly and without restraint.
どうぞ思う存分食べてください。
Please eat to your heart's content.
休みを取ったので、旅行を思う存分楽しんだ。
I was on holiday, so I enjoyed the trip to the fullest.
会議で自分の意見を思う存分述べることができた。
I was able to express my opinion freely at the meeting.