expression
to one's heart's content; as one pleases
Used when someone does something exactly as they wish, without restraint. Often follows a volitional verb or する.
See also: 思うまま
休日は思うがままに過ごしたい。
I want to spend my day off just as I please.
彼は思うがままに絵を描いた。
He painted the picture to his heart's content.