Not exactly sure what could be causing this, but here is a good link to keep handy for any bulletins for your Maxima:
http://www.nissan-techinfo.com/TSB/TSB_ ... A34)+04-08
I know I had a friend who had a 2004 Sentra SE-R Spec V that this happened to and ended up needing his fuel pump replaced (which is a fairly common issue that comes up with those cars around 75,000 miles, although his is the only one I've heard of where the fuel gauge stopped working correctly.) I'll see if I can do some more digging for you.