Ideally you want that sensor near the pitch and roll center of your boat. Of course that's often right where it's most difficult to mount it and route the wiring!
And then there's the need to stay clear of steel tools, supplies, spare parts, and permanent magnets in other pump motors, for instance.
Sidebar: We really wanted... to mount it on the base of the table in the center of the cabin, but it ended up nearby on the inside of the frp module that supports our nav station.
IF.... a prior owner or some heedless factory dude put yours way back aft or any other place that makes its sensing task more difficult, you should have a go a relocating it. Note that it has to correctly oriented side to side when mounted, too.
If that sensor is out of sight, also put their little "no magnets" warning sticker on the nearest surface facing you.
The closer it is to its optimal location, the easier it will be to calibrate it and more reliable it will be when the boat gets moved around by rambunctious wave action...
Loren