Measure the top of the mattress and then the depth.
Calculate the number blocks you need if you want the patchwork to come to the edge. Determine how many of a certain size block you need. then add for overhang.For example. According to a size chart the Calif King is 72" wide and 84 long. If you used 12" blocks that would be 6 blocks wide and 7 blocks long.
Plus the borders for overhang or if you didn't intend to put borders then would need to add blocks to width and length.
I find it easier in situations like this to do a very rough sketch or floor plan of the size I need and then do the calculations. Then I will know how many blocks to make, how much fabric to buy etc.
I have often made up the bed with a sheet the size I need and then measure. Also consider if you are going to cover the pillows with the quilt and take that into account.